Re: solve ODE help?
- To: mathgroup at smc.vnet.net
- Subject: [mg72134] Re: solve ODE help?
- From: dh <dh at metrohm.ch>
- Date: Wed, 13 Dec 2006 06:39:35 -0500 (EST)
- References: <eljb9d$7h0$1@smc.vnet.net>
Hi learner, write NDSolve instead of NSolve, Derivative instead of Direvative, but you can also use the simplier y', and {x,xmin,xmax} instead of x. the correct syntax is e.g.: NDSolve[{y'[x] + y[x] Tan[x] == Sin[2x], y[0] == 2}, y, {x, 0, 1}] Daniel learner wrote: > Hi, everyone, > i am new to solve ode in mathematica. i am trying to solve two > odes(not for hw :)). > y'+ytan(x)=sin(2x) > > I use: NSolve[{Direvative[1][y][x]+y Tan[x]==Sin[2x]},y,x] > > and get reply saying that: > InverseFunction::ifun: Inverse functions are being used. Values may be > lost for multivalued inverses > > {{y[x]->cot[x](sin[2x]-y'[x]}} , > the mathematica did not solve the equation?? > > Furthermore, I add condition that y==2 when x==0 by saying: > > NSolve[{Direvative[1][y][x]+y Tan[x]==Sin[2x],y[0]==2},y,x] > > but no help ? why? > thanks >