problem with less than operator in a sequence command

Niek Sprakel shared this question 3 years ago
Answered

Hi.

When I try to use the 'less than' operator to obtain the area under a curve composed of semicircles generated by a sequence command, it doesn't work as expected.

I have a list of circles specified as combinations of a location on the x-axis and a radius and I can use the sequence command to turn this into a sequence of alternating semicircles, but when I try to do something similar with the area under these alternating semicircles, something goes wrong.

Thanks in advance for any suggestions how to resolve this, Niek

Best Answer
photo

I can... both...

(the only "bug" is than "<" is not visible in Algebra view)

5944032ba3d661357511d8556f479067

Comments (8)

photo
1

Hi

Try


Sequence(y<l2(p, x), p, 1, 5)

photo
1

It doesn't seem to work for me. Can you show it working in a screenshot or share a ggb file that demonstrates it?

photo
1

I can... both...

(the only "bug" is than "<" is not visible in Algebra view)

5944032ba3d661357511d8556f479067

photo
1

When I try this in the Geometry app, as soon as I've typed "l4 = sequence(y<l2)", somehow l2 suddenly disappears. So that's before I even succeed in entering the complete expression to try it out.

https://i.imgur.com/lY0exYz.png

photo
1

ok for me with Geometry app

i write l4 without problem (and < is ok in Algebra view in this app (last screen shot was with GeoGebra 5))


7bf423b4092f44d65b248760901155e1

photo
1

Hmmm, I think I see now what the problem is, geogebra tries to evaluate the expression as I'm entering it and if a partial expression boils down to something invalid, it can cause other expressions that are referenced in the partial expression to suddenly disappear.

I can get it to work if I first enter:

l4 = sequence(l2(p, x), p, 1, 5)

and subsequently modify the expression to:


l4 = sequence(y < l2(p, x), p, 1, 5)


https://i.imgur.com/UahdX3R.png

photo
1

Maybe it works different on the mac (I'm on windows).. anyway, that solves it I guess. Thanks!

photo
1

I don't think it depends of mac or windows. Perhaps a problem of computer (power or RAM...)

Anyway, happy for you...

photo
© 2023 International GeoGebra Institute