Re: question
- To: mathgroup at smc.vnet.net
- Subject: [mg43534] Re: [mg43473] question
- From: Hugh Walker <hwalker at gvtc.com>
- Date: Fri, 19 Sep 2003 03:41:57 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
On Thursday, September 18, 2003, at 04:38 AM, Aslaninejad Morteza wrote: > > I have solved a differential equation numerically with NDSolve and > now, I > would like to do the following step but I don't know how? > 1- Take the derivative of the answer first. > 2- Sum the square of answer and the square of the derivative secondly. > thanks in advance Hi Aslaninejad; sol = x/.NDSolve[{x''[t]+0.3 x'[t]+x[t]==0, x[0]==1,x'[0]==0}, x,{t,0,10}]//First; img1 = Plot[sol[t],{t,0,10}]; img2 = Plot[D[sol[t],t]//Evaluate,{t,0,10}]; img3 = Plot[D[sol[t],{t,2}]//Evaluate,{t,0,10}]; Best wishes, ========== Hugh Walker Gnarly Oaks