Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: NDSolve vs. DSolve

  • To:
  • Subject: [mg10931] Re: NDSolve vs. DSolve
  • From: Paul Abbott <>
  • Date: Thu, 12 Feb 1998 20:16:14 -0500
  • Organization: University of Western Australia
  • References: <6brh2k$>

Students wrote:

> In the following examples the DSolve solves easily while the NDSolve is
> producing the listed error messages. Why is that and how is it bypassed.
> DSolve[y'''[x]==-Cos[x],y[0]==0,y[5]==0,y'[0]==0,y[x],x]
> NDSolve[y'''[x]==-Cos[x],y[0]==0,y[5]==0,y'[0]==0,y[x],{x,0,5}]
> NDSolve::unsol:
> Not possible to initiate boundary value problem with the chasing method

DSolve solves the differential equations and then fits the undetermined
coefficients using the boundary conditions.

For problems of this type you can use the shooting method (replacing
y[5]==0 with y''[0]==a and determining a):

In[1]:= system[a_]:= s= 


In[2]:= gun := y[5] /. system[#1] & 

In[3]:= FindRoot[gun[a] == 0, {a, 0, 0.3}] Out[3]= {a -> 0.476715}

In[4]:= y[5] /. s
		9.47337 10

In[5]:= Plot[Evaluate[y[x] /. s], {x, 0, 5}]


Paul Abbott                                   Phone: +61-8-9380-2734
Department of Physics                           Fax: +61-8-9380-1014
The University of Western Australia            Nedlands WA  6907  AUSTRALIA                   

            God IS a weakly left-handed dice player

  • Prev by Date: Re: Knowledge about a Mathematica book
  • Next by Date: Re: String patterns
  • Prev by thread: NDSolve vs. DSolve
  • Next by thread: eigenmatrix of a tensor