Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline hakelm  
#1 Posted : 12 August 2019 22:52:05(UTC)
hakelm

Rank: Newbie

Groups: Registered
Joined: 12/08/2019(UTC)
Posts: 4

Integrating the simple functions 1/x, 1/x², 1/x³ upwards from 1 give correct results for low values of the upper limit but with the upper limit in the order of 200 or higher the results are not what I would expect. Please see the attached worksheet.
Is there a problem with the integral function or is there something I haven't grasped?
H
integral.sm (6kb) downloaded 14 time(s).

Edited by user 12 August 2019 22:55:34(UTC)  | Reason: Not specified

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline Razonar  
#2 Posted : 13 August 2019 07:33:32(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Hi. It's because the integral it's a numerical procedure, and maybe not a very robust one. So, like any numerical method, if it don't work, just use another.

integral.sm (14kb) downloaded 16 time(s).

Best regards.
Alvaro.
Offline PompelmoTell  
#3 Posted : 13 August 2019 11:04:21(UTC)
PompelmoTell


Rank: Advanced Member

Groups: Registered
Joined: 23/12/2011(UTC)
Posts: 318
Man
Italy
Location: italy

Was thanked: 109 time(s) in 93 post(s)
Hakelm,
I opened your file and the results were correct. Therefore I believe that the parameter for the accuracy of the integrals in your SMath installation is not correctly set.
Try to change Tools->Options->Calculation->Integral Accuracy
For example, write 1000

However, Alvaro's considerations must be kept in mind

sergio

Edited by user 13 August 2019 12:53:24(UTC)  | Reason: Not specified

Offline hakelm  
#4 Posted : 13 August 2019 12:50:17(UTC)
hakelm

Rank: Newbie

Groups: Registered
Joined: 12/08/2019(UTC)
Posts: 4

Many thanks for two very good answers!
Now I know that Smath doesn't know even the simplest of integrals but that approximation accuracy can be improved upon.
Even if I understand my system doesn't (SMathStudioDesktop.0_99_7109.Mono on Ubuntu 16.04).
It can't find the function Rkadapt.
I guess that the Runge-Kutta functions are to be found i some plugin. Where can I find that?
H
Offline uni  
#5 Posted : 13 August 2019 14:44:46(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,493
Man
Russian Federation

Was thanked: 1274 time(s) in 745 post(s)
Originally Posted by: hakelm Go to Quoted Post
I guess that the Runge-Kutta functions are to be found i some plugin. Where can I find that?

ODE Solvers.

Russia ☭ forever
Viacheslav N. Mezentsev
Offline Jean Giraud  
#6 Posted : 13 August 2019 16:35:06(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: hakelm Go to Quoted Post
Is there a problem with the integral function or is there something I haven't grasped?

The Simpson integrator ranges from exact to freak.
In your examples, increase the integral accuracy from
menu, options, calculations, integral accuracy [max 10000]
Wise to sanity Wolfram Alpha cost is 0.00 $

integral.sm (47kb) downloaded 11 time(s).

Offline hakelm  
#7 Posted : 14 August 2019 16:19:49(UTC)
hakelm

Rank: Newbie

Groups: Registered
Joined: 12/08/2019(UTC)
Posts: 4

May I assume that the SMath-integral is made using Simpson's rule and that the integral accuracy [max 10000] is the number of steps taken by Simpson?
H
Offline Jean Giraud  
#8 Posted : 14 August 2019 17:14:29(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: hakelm Go to Quoted Post
May I assume that the SMath-integral is made using Simpson's rule and that the integral accuracy [max 10000] is the number of steps taken by Simpson?

Quite right: The Smath integrator is Simpson.
Ranged accuracy [50 ... 10000]. Trivial cases are exact.
Two more exact cases are know 1/x [ln(x), b_spline].
On long range of the variate 'x' the Simpson/Romberg kernel
gives a much better result than simple Simpson.
Carlos adaptive algorithm is fool proof all cases.
You want these two proposed ... reply YES/NO.
Jean

Offline hakelm  
#9 Posted : 14 August 2019 19:53:22(UTC)
hakelm

Rank: Newbie

Groups: Registered
Joined: 12/08/2019(UTC)
Posts: 4

Yes please
H
Offline Jean Giraud  
#10 Posted : 15 August 2019 01:07:51(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
As you can see, Romberg has the virtue of reducing the range of integration
in the [0 ... 1 ] domain. In two versions directly associated with the
Smath native Simpson integrator or Simpson algo style, thus integration
accuracy 'n' @ the user command line.
These two documents are like minimalist tool box.

Jean

Romberg-Simpson.PNG

Integrate Compendium_1 Romberg_FD_Adaptive [Carlos].sm (143kb) downloaded 7 time(s).
Integrate Compendium_21 Simpson-Romberg Merit.sm (139kb) downloaded 9 time(s).

Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.