Properties
Similar Topics
Statistics
Comments
9
Participants
4
Subscribers
29
Votes
4
Views
6396
Share
If and Conditional functions
Solved
Hi,
Drawing conditional functions is easy with the Ifcommand, but I have noticed something strange if I want to calculate something with these functions.
If the condition involves double inequation's GeoGebra's CAS can't calculate for example the limit of a function for a value.
So for example:
"g1(x):=If(x<3, 4x+13,x<2,x^2+2x2,x>=2,5x+1)"
limit(g1,3) gives 1
but
"g2(x):=If(x<3,4x+13, 3<=x<2,x^2+2x2,x>=2,5x+1)"
"limit(g23)" gives ?
I noticed this same problems comes with for example
"f(x):=If(2<x<2,x)"
"limit(f,0)" gives ?
Br, Lauri Hellsten
Files:
Näyttökuva 20...
 GeoGebra
 Help
 Partners

Contact us
 Feedback & Questions
 This email address is being protected from spambots. You need JavaScript enabled to view it.
 +43 677 6137 2693
© 2022 International GeoGebra Institute
Please try with the simpler definition:
Hi Michael,
Thanks for the suggestion,
Like I said in my original post I know how I can write the original conditional function so that it works.
I am merely asking, why the double inequations for example
"f(x):=If(2<x<2,x)" and "limit(f,0)" gives "?".
This is pretty fustrating for students, because if you have an conditional function in three parts you don't give it like this:
"f(x) = If(x < 3, 4x + 13, x < 2, x² + 2x  2, x ≥ 2, 5x + 1) "
Most likely you would give it like this:
"f(x) = If(x < 3, 4x + 13,  3 <= x < 2, x² + 2x  2, x ≥ 2, 5x + 1) "
They both draw it the same, but the latter does not calculate the limit correctly.
Is this an attribute of GeoGebra or is there something else to this?
Br, Lauri
I will attach a screenshot of the problem:
Both functions draw correctly the same function. You can't calculate the limit with function f1 although that would be the natural way to assign the function.
Another example of using the double inequations in a conditional function is in the GeoGebra Wiki ( https://wiki.geogebra.org/e... )
f(x) =If(x<1,x²,1<=x<=1,1,x²+2) < This will not calculate the limit in anywhere.
Is this a bug?
Br, Lauri
I have a similar problem:
f(x):=If(x<1,1,0)
Limit(f,0)=1
g(x):=If(x<1,1)
Limit(g,0)=?
I agree with Lauri. Students want to write it like
f(x) =If(x<1,x²,1<=x<=1,1,x²+2)
Limit commands dont work with that.
M
Continuing on the same subject one could ask is this even a function that is shown in the algebrawindow?
f( 2 )=2 or 1 ?
When you can't calculate with a piecewise function that has double inequalities in the condition it forces me to use different notation in GeoGebra than it is normal in mathematics for piecewise functions in three parts. I think this is a problem and it should be addressed.
Br, Lauri
Try this
f(x)=If(x < 3, 4x + 13, x < 2, x² + 2x  2, x ≥ 2, 5x + 1)
g(x)=If(x < ∞, f(x))
We've made some improvements for next release (v507). It still won't work for functions with undefined/infinite regions.
This will be fine:
Comments have been locked on this page!