Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: integration with the symbolic toolbox
Replies: 8   Last Post: May 3, 2012 2:47 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Ravi

Posts: 10
Registered: 5/3/12
integration with the symbolic toolbox
Posted: May 3, 2012 5:54 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi,
Hi,
I have started to work with the R2009b version of the symbolic toolbox.
I would like to have some help with integration. Consider the following code :
syms x m p
f=exp(-m/x^2-p*x^2)
integ=int(f,0,inf)
taylor(f,6)

I get a message that an explicit integral cannot be found. Fair enough. Except that I know that the answer is :
sqrt(pi)/2/sqrt(p)*exp(-2*sqrt(m*p))
Even though I know the answer, I want to use the symbolic toolbox for more complicated forms of the above integral. To do this, I went in the opposite direction by starting with even simpler forms of the integral. For example :
int(exp(-p*x^2),0,inf)
For which, I should get the answer :
1/2*sqrt(pi/p)
Instead, I got the following message :
warning: Explicit integral could not be found.

ans =

piecewise([p < 0, Inf], [(0 <= Re(p) or abs(arg(p)) <= pi/2) and p <> 0, pi^(1/2)/(2*p^(1/2))], [Otherwise, int(1/exp(x^2*p), x = 0..Inf)])
Is there some way of proceeding here, that I am missing?

Finally, I tried to get taylor series expansion
>> taylor(exp(-m/x^2-p*x^2),6)
Warning: cannot compute a Taylor expansion of exp(- m/x^2 - p*x^2). Try 'series'
with one of the options 'Left', 'Right', or 'Real' for a more general expansion
[taylor]

ans =

taylor(1/exp(m/x^2 + p*x^2), x = 0, 6, AbsoluteOrder)

How do I interpret this? Should I use "series" somehow in the taylor function? The syntax for the taylor command does not seem to allow any such a possibility.

Any and all help will be appreciated. As you can see, I am just beginning to get acquainted with the symbolic toolbox.
Thanks,
Ravi



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.