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: Solving Second Order Homogeneous Diff Eq
Replies: 1   Last Post: Feb 1, 2013 2:22 AM

Advanced Search

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

Posts: 1,459
Registered: 11/8/10
Re: Solving Second Order Homogeneous Diff Eq
Posted: Feb 1, 2013 2:22 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Cody" wrote in message <keekng$cpo$1@newscl01ah.mathworks.com>...
> Hello everyone, I'm trying to solve the standard 2nd order differential equation with constant coefficients listed below under the specified boundary conditions:
>
> -dP(x)^2/dx^2 = C * P(x) where C=(2*E*m)/h^2
>
> under the boundary conditions P(-L/2)=0 and P(L/2)=0 for some constant L>0.
>
> Matlab is able to solve the equation with the expected general solution, however, when I apply the boundary conditions, the 'dsolve' command fails. I know a solution exists under these boundary conditions because I can successfully solve the equation by hand, and the solution is listed in a textbook.
>
> Matlab correctly calculates the general solution 'P(x)':
>
> syms C E m h P(x) real
> C=(E*2*m)/h^2;
> assume(C>0 & E>0 & m>0 & h>0)
> P(x)=dsolve( -diff(P,2)==C*P )
>
> However, when I attempt to apply the boundary conditions Matlab calculates P(x)=0. I would appreciate any advice on how to correctly setup Matlab to solve this type of differential equation.
>
> syms C E m h L P(x) real
> C=(E*2*m)/h^2;
> assume(C>0 & E>0 & m>0 & h>0 & L>0)
> P(x)=dsolve( -diff(P,2)==C*P, P(-L/2)==0, P(L/2)==0 )
>
> Thank you,
> -MntGoat


P(x)=0 actually _is_ the solution of your ODE under the prescribed boundary conditions.
Insert it in your differential equations and you will see that it satisfies both the differential equation and the boundary conditions.

Best wishes
Torsten.



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.