f



Solving a differential equation numerically in Mathematica

Hi all, 

Does anyone know if Mathematica can numerically solve a second order differential equation?

0
deanjac (1)
4/27/2007 9:32:38 AM
comp.soft-sys.math.mathematica 28821 articles. 0 followers. Follow

8 Replies
689 Views

Similar Articles

[PageSpeed] 1

Blake Jackson wrote:
> Hi all, 
> 
> Does anyone know if Mathematica can numerically solve a second order differential equation?
> 

Sure it can. Search the documentation for *NDSolve* [1]. For example 
(adapted from [2], which is a nice and short introduction to solving 
ODEs with Mathematica),

In[1]:=
sol = NDSolve[
    {Derivative[2][x][t] + gamma*Derivative[1][x][t] +
        x[t]^3 == A*Cos[t], x[0] == 0.6,
      Derivative[1][x][0] == 1.25} /.
     {gamma -> 0.15, A -> 0.3}, x, {t, 0, 100}]
Plot[x[t] /. sol, {t, 0, 100}]

Out[1]=
{{x -> InterpolatingFunction[]}}

Out[2]=
Graphics[]

Regards,
Jean-Marc

[1] _Mathematica 5.2 Documentation_, "Built-in Functions / Numerical 
Computation / Equation Solving / NDSolve", 
http://documents.wolfram.com/mathematica/functions/NDSolve

[2] _Integrating Equations of Motion in Mathematica_, Gary L. Gray, 
Assistant Professor, Engineering Science and Mechanics, The Pennsylvania 
State University, 
http://www.esm.psu.edu/courses/emch12/IntDyn/course-docs/Mathematica/MmaGuide-GLG.pdf

0
4/28/2007 9:53:06 AM
Blake Jackson wrote:
> Hi all, 
> 
> Does anyone know if Mathematica can numerically solve a second order differential equation?
> 

Why don't you type your question in Google?

http://www.google.com/search?q=mathematica+numerically+solve+differential+equation
http://documents.wolfram.com/mathematica/functions/NDSolve

0
szhorvat (1435)
4/28/2007 9:54:07 AM

Hi,

it depends on the differential equation (DE). For most DE that occur in 

praxis the answer is yes. Read the manual under: DSolve

hope this helps, Daniel



Blake Jackson wrote:

> Hi all, 

> 

> Does anyone know if Mathematica can numerically solve a second order differential equation?

> 



0
dh142 (1271)
4/28/2007 10:03:29 AM
Hi,

yes.

Regards
   Jens

Blake Jackson wrote:
> Hi all, 
> 
> Does anyone know if Mathematica can numerically solve a second order differential equation?
> 

0
kuska (2791)
4/28/2007 10:13:42 AM
Of course! See the documentation on "NDSolve" or evaluate "?NDSolve"
to avoid searching

=CF/=C7 Blake Jackson =DD=E3=F1=E1=F8=E5:
> Hi all,
>
> Does anyone know if Mathematica can numerically solve a second order diff=
erential equation?


0
s.nesseris (61)
4/28/2007 10:14:43 AM
..=2E.in praxis...

Hi David.
Did you know that praxis is a greek word?

http://en.wikipedia.org/wiki/Praxis_%28word%29

Cheers
Dimitris



=CF/=C7 dh =DD=E3=F1=E1=F8=E5:
> Hi,
>
> it depends on the differential equation (DE). For most DE that occur in
>
> praxis the answer is yes. Read the manual under: DSolve
>
> hope this helps, Daniel
>
>
>
> Blake Jackson wrote:
>
> > Hi all,
>
> >
>
> > Does anyone know if Mathematica can numerically solve a second order di=
fferential equation?
>
> >


0
dimmechan (1125)
4/29/2007 7:10:01 AM
If you are interested to more greek words encountered in english
vocabulary see here...

http://en.wikipedia.org/wiki/Xenophon_Zolotas

about a Greek economist which is...also famous for demonstrating the
contribution of Greek language to the English vocabulary by making
English speeches, as he said, "using with the exception of articles
and prepositions only Greek words", to foreign audiences.

Dimitris


=CF/=C7 dh =DD=E3=F1=E1=F8=E5:
> Hi,
>
> it depends on the differential equation (DE). For most DE that occur in
>
> praxis the answer is yes. Read the manual under: DSolve
>
> hope this helps, Daniel
>
>
>
> Blake Jackson wrote:
>
> > Hi all,
>
> >
>
> > Does anyone know if Mathematica can numerically solve a second order di=
fferential equation?
>
> >


0
dimmechan (1125)
4/29/2007 7:15:06 AM
Blake Jackson wrote:
> Hi all, 
> 
> Does anyone know if Mathematica can numerically solve a second order differential equation?
> 
This is a bit like asking if it is possible to hire a car when visiting 
the US!

David Bailey
http://www.dbaileyconsultancy.co.uk

0
dave7033 (662)
4/30/2007 7:41:30 AM
Reply: