       Re: Solving a differential equation numerically in Mathematica

• To: mathgroup at smc.vnet.net
• Subject: [mg75388] Re: Solving a differential equation numerically in Mathematica
• From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
• Date: Sat, 28 Apr 2007 05:52:12 -0400 (EDT)
• Organization: The Open University, Milton Keynes, UK
• References: <f0sfvm\$ndg\$1@smc.vnet.net>

```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* . For example
(adapted from , which is a nice and short introduction to solving
ODEs with Mathematica),

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

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

Out=
Graphics[]

Regards,
Jean-Marc

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

 _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

```

• Prev by Date: Re: FourierCosTransform
• Next by Date: Re: FourierTransform and removable singularities
• Previous by thread: Re: Solving a differential equation numerically in Mathematica
• Next by thread: Re: Solving a differential equation numerically in Mathematica