<![CDATA[Integral fails, NIntegral correct]]>
https://help.geogebra.org/topic/integral-fails-nintegral-correct
Sun, 25 Mar 2018 19:10:26 +0000Sun, 18 Mar 2018 16:20:45 +0000Zend_Feed<![CDATA[In the meantime I have found a workaround that helps: g(x)=If(0.1 ≤ x ≤ 3, f_s(x)) Strange enough this yield the correct integral-number with Integral-command!]]>
https://help.geogebra.org/topic/integral-fails-nintegral-correct#comment-236132
Sun, 18 Mar 2018 16:56:48 +0000<![CDATA[If you look at Integral(f_s) you'll see the problem (it's not continuous)]]>
https://help.geogebra.org/topic/integral-fails-nintegral-correct#comment-236208
Mon, 19 Mar 2018 19:04:49 +0000<![CDATA[I can't see this (in my version of the program); I added a screenshot - as you can see even the derivative of f_s is continuous, even the derivative of the derivative - splines must have this property. Seems - we both see different things on the screen (therefore the screenshot!) - but thank you for thinking over it!]]>
https://help.geogebra.org/topic/integral-fails-nintegral-correct#comment-236226
Tue, 20 Mar 2018 07:20:42 +0000<![CDATA[Sorry - I missed the point! You spoke of Integral(f_s) not f_s! But why is the integral-function F_s discontinuous? As I see it, it should be F_s(x):= int_a^x f_s(t)\, dt with "a" some real constant. ??? Can you explain, please!]]>
https://help.geogebra.org/topic/integral-fails-nintegral-correct#comment-236228
Tue, 20 Mar 2018 07:30:14 +0000<![CDATA[The integration is done piecewise. If you define this (for the appropriate value of a!) F(x) = If(x ≥ 2 / 5 ∧ 11 / 5 > x, 1 / 12500 (12125 / 4 x⁴ - 18575x³ + 72375 / 2 x² - 5879x), 0) + If(x ≥ 11 / 5, 1 / 25 (-5x⁴ + 60x³ - 248x² + 458x) - a, 0) + If(2 / 5 > x, 1 / 20000 (-18250x⁴ + 7300x³ + 35505x² - 3227x), 0)
and then f_s(x) = F'(x)
then you can get accurate integrals with: F(b) - F(a)]]>
https://help.geogebra.org/topic/integral-fails-nintegral-correct#comment-236256
Tue, 20 Mar 2018 12:02:15 +0000<![CDATA[We've made an improvement for the next release (v448) so that Integral() and NIntegral() give the same answer for your example. The approach above (defining F(x) first) is more robust and accurate though. Also it's better to define such functions with one If() if possible, eg F(x) = If(0.4 ≤ x < 2.2, 1 / 12500 (12125 / 4 x⁴ - 18575x³ + 72375 / 2 x² - 5879x), x ≥ 11 / 5, 1 / 25 (-5x⁴ + 60x³ - 248x² + 458x) - a, 2 / 5 > x, 1 / 20000 (-18250x⁴ + 7300x³ + 35505x² - 3227x), 0)]]>
https://help.geogebra.org/topic/integral-fails-nintegral-correct#comment-236264
Tue, 20 Mar 2018 12:05:11 +0000<![CDATA[Thank you Michael for your elaborate explanation - I must commit, I assumed the Integral-functions are also continuous - an error! Because my splines are built with Javascript as a "string", it's no problem to build a "one If" statement instead of an "If-sum"; After your proposal I think that it may be better to integrate my splines in javascript (polynomials should not be an obstacle), handle it over to geogebra, and take the derivative there - if I need an integration, I could use the "original" F_s- function with F_s(b)-F_s(a) (as you suggested) Thank you once again - I've learned a lot! Hans]]>
https://help.geogebra.org/topic/integral-fails-nintegral-correct#comment-236272
Tue, 20 Mar 2018 14:53:19 +0000<![CDATA[v448 online now :)]]>
https://help.geogebra.org/topic/integral-fails-nintegral-correct#comment-236534
Sun, 25 Mar 2018 19:10:29 +0000