Problem? Definite integral with variable limits - Messages
Please look at the picture:
I can not understand this. There must be something in the definite integral realization in SMath.
1. The function defined F(x) as definite integral with variable limit x can be defined
2. Calling this function will give the result
3. Plotting of this function is not possible???
4. Solve, f.e. with this function will not give the result???
Could you give me some hints what is this about?
Regards,
Radovan
But, this is wrong???
Regards,
Radovan
I think the problem you have found is issued in a topic before (see: http://en.smath.info/forum/default.aspx?g=posts&t=85)
The definite integral is only nummerically implemented so far (at least it was the days when the other post was written), therefore it is impossible to plot the solution of a definite integral. Of course there is no problem with numerically solving it.
If you try to symbolically solve your integral, there will be an error (limits must be real).
So currently it is simply not possible to symbolically integrate.
But why the plot is wrong, Andrey has to answer.
Ciao Jakob
And about integral: evaluation of integral in SMath Studio is numeric, but some actions that you test requires symbolic result of the expression inside. That's why you can't evaluate some stuff in your first calculation. jakobg pointed this rightly.
Wrote
I think the problem you have found is issued in a topic before (see: http://en.smath.info/forum/default.aspx?g=posts&t=85)
Thanks Jacob. Unfortunately, I can not access this topic (access is denied for me ??)
Wrote
The definite integral is only nummerically implemented so far (at least it was the days when the other post was written), therefore it is impossible to plot the solution of a definite integral. Of course there is no problem with numerically solving it.
If you try to symbolically solve your integral, there will be an error (limits must be real).
So currently it is simply not possible to symbolically integrate.
I understand all of this. About plotting, you are right - my mistake, sorry.
I am not sure about "solve" function. It seems that the function for which we are finding roots must be also given analitically. I am not sure but I made some example that involved summation. "Solve" did not solve the original function until I represent it symbolically using SMath.
Regards,
Radovan
WroteAbout wrong plot results in the second example: do you really sure in your example? I thing you should use [MATH]F(x)←int(t^3+10;t;0;x)[/MATH] instead of [MATH]F(x)←int(x^3+10;x;0;x)[/MATH].
And about integral: evaluation of integral in SMath Studio is numeric, but some actions that you test requires symbolic result of the expression inside. That's why you can't evaluate some stuff in your first calculation. jakobg pointed this rightly.
Thanks Andrey,
I understood that. I intentionally put this, because many times this happened to my students in Mathcad. I was expecting that some error should be issued in SMath with this expression when, say, plotting it.
[MATH]F(x)←int(x^3+10;x;0;x)[/MATH]
But, it worked and I was puzzled about it?. In the first place, how this could be plotted (wrongly) considering the rules about plotting and definite integral as numerically solved?
This might cause problems in Mathcad in spite of that it could solve it analitically, until you use the correct expression (the limit variable should not be the same as the variable in the primitive function) say
[MATH]F(x)←int(t^3+10;t;0;x)[/MATH]
Your example about plotting the function with definite integrals is quite understandable and this plot is right, but please take a look at your (correct) plot and the one I mentioned incorrect (the blue line represents F(x)). What is this about?
Regards,
Radovan
I see what you mean with this Solve function. Well I think the Solve function uses something like a Newton sceme to find the roots and therefore the function itself (and not just a few Points - if solved numerically) is necessary to solve the equation. So if you try the line solve(F(x),x,-4,0) SMath might intent to build something like dF(x)/dx which is not available symbolical! And therefore there is no way to solve this.
Ciao
Jakob

Jakob
WroteOh damn!! Sorry RADOVAN!!! It was just a typo error, I swear!!
Jakob
Sorry Jakob, what typo ???
Wrote
Well I think the Solve function uses something like a Newton sceme to find the roots and therefore the function itself (and not just a few Points - if solved numerically) is necessary to solve the equation.
If this is the case i.e. Newton like procedure with analitical derivatives, it is quite understandable then.
Thanks Jakob,
Radovan
Wrote
I am not sure about "solve" function. It seems that the function for which we are finding roots must be also given analitically. I am not sure but I made some example that involved summation. "Solve" did not solve the original function until I represent it symbolically using SMath.
Actually, I was wrong - sorry

Regards,
Radovan
well, actually my typo was something different, but if nobody "found" it, I am not going to mention it here.
An interesting topic is, I have copied the url from my adress bar and I too get the error access denied.
Thanks Andrey for the link, this was the post I was talking about.
Ciao Jakob
I just came across a related problem with definite integrals.
I tried to calculate a definite integral of a piecewise linear function.
Therefor I have defined a function
f(x):= if x <5
3
else
5
If I try to calculate the integral from 0 to 10 of f(x) dx
I get the message that x is undefined.
Regards
Stephan
P.S. I still have no idea how to insert screen shots.
Is there any tutorial about this?
WroteTherefor I have defined a function
f(x):= if x <5
3
else
5
If I try to calculate the integral from 0 to 10 of f(x) dx
I get the message that x is undefined.
It was mentioned in some other posts (for example "int" does not like "if"?) I suppose this is due to the internal SMath
numerical integration. If you want to integrate a discontineous function try something like this:
[MATH]f(x)←(x<5)*3+(x≥5)*5[/MATH]
[MATH]int(f(x);x;-4;8)=42,04[/MATH]
(Pay attention on the numerical error, the result is 42 actually. Try to avoid using this or see the example on Wiki)
Wrote
P.S. I still have no idea how to insert screen shots.
Is there any tutorial about this?
Put it on some free file hosting and make a link to it via "Create link" tool when posting.
Regards,
Radovan
thank you very much for the quick reply and the helpful links.
I will try to split my definite integral into sections where my function is continous.
Regards
Stephan
Also thanks to Greg for the hint with the wiki.
The X-Y Plot plugin does not seem to have that problem. A workaround might be to apply eval() for expressions to be plot
by default. At least I am not aware of counter-indications.
-
New Posts
-
No New Posts