Bug with Integral command in online worksheets and GeoGebra 6 desktop

Juan Carlos Ponce Campuzano shared this problem 6 years ago
Not a Problem

Hello everyone,


Calculating some integrals for approximating functions with polynomials I found that this integral cannot be calculated with GeoGebra 6 (desktop and online version):


Integral[

(1/sqrt(1-x^2))*(2 x^2 - 1)*(abs(x)) ,-1,1]/Integral[(1/sqrt(1-x^2))*(2 x^2 -

1)^2 ,-1,1]


However, GeoGebra 5 (desktop) can calculate it without any problem.


78a0745bfb56751445dc1ba567beb32f


I noticed this issue when I upload this worksheet (made with GeoGebra 5): https://ggbm.at/FYmWtRPV


It works perfect in my desktop with GeoGebra 5.


882e200d107bfcffd375d2d504e29edb


However, it does not work fine online.


I tried opening the same file (see attached) with GeoGebra 6 (desktop) and it has the same issue.


1db6c7e108c4b861229d199e21f6cf71


thanks for any help.


Kind regards.

Comments (4)

photo
1

Although Using CAS in GeoGebra 6 works fine.


3500f12efa0604a65d4791ce80b2f0c3

photo
1

Instead of


  1. Sequence[Integral[Element[Legendre, i] f0(x), -1, 1] / Integral[Element[Legendre, i]², -1, 1], i, 1, 11]

try using

  1. Sequence[Integral[Element[Legendre, i] f0(x)] / Integral[Element[Legendre, i]²], i, 1, 11]

or (better if the functions won't change as the CAS won't need to be loaded)

  1. CopyFreeObject[Sequence[Integral[Element[Legendre, i] f0(x)] / Integral[Element[Legendre, i]²], i, 1, 11]]

photo
1

The problem is not calculating that one. The issue is with this one:


  1. Sequence[Integral[w(x)*Element[Chebyshev, i]*f0(x),-1,1]/Integral[ w(x)*(Element[Chebyshev,i])^2,-1,1],i,1,11]


Where w(x)=1/sqrt(1-x)^2

It is interesting that GGB5 can handle this integral but GGB6 can't.

Besides, I would like to calculate the numerical value.

I will try something else. :)

Thanks Michael. Kind regards...

photo
1

The online version uses numerical integrals (which doesn't work as some of those functions have vertical asymptotes). If the functions (and domains) aren't changing then precalculating with CopyFreeObject() should do the trick!

© 2023 International GeoGebra Institute