Re: How to solve this equation?

*To*: mathgroup at smc.vnet.net*Subject*: [mg72195] Re: How to solve this equation?*From*: "Steve Luttrell" <steve_usenet at _removemefirst_luttrell.org.uk>*Date*: Thu, 14 Dec 2006 05:49:10 -0500 (EST)*References*: <eloqvd$o2j$1@smc.vnet.net>

This does what you want. DSolve[{Derivative[1][y][x] + y[x]*Tan[x] == Sin[2*x], y[0] == 2}, y[x], x] {{y[x] -> -2*(-2*Cos[x] + Cos[x]^2)}} Steve Luttrell West Malvern, UK "learner" <freephys at gmail.com> wrote in message news:eloqvd$o2j$1 at smc.vnet.net... > hi, > I am trying to solve y'+y tanx=sin(2x) > > i wrote NSolve[{Derivative[1][y][x]+y Tan[x]==Sin[2x]},y,x] but get > something like > > {{y->cot[x](sin[2x]-y`[x]}} > > I want to set a restraint to say y=2 when x=0, how shoud i do it? > > many thanks!!! >