# Thread: Differential equation xy'+y= sinx

1. ## Differential equation xy'+y= sinx

xy'+y= sinx IVP is y(pi)=0

My attempt:

y' +y/x = sinx/x

Finding the I.F

e^\$1/x * dx = e^lnx

I.F is x

Muliply all the equation by x

xy' + y = sinx

Restate the equation

(x*y)' = sinx

xy = -cosx + c

y = -cosx / x + c

I think i have done right so far, but I dont know how to to evaluate it with the
values look:

0 = - cos pi / pi + c ??? what How do i evaluate that?

2. -cos(pi)/pi = 1/pi
0 = 1/pi + c
c = -1/pi
y = -cos(x)/x - 1/pi

(edit)
The above corresponds to a previous error in calculation, but I have left it so the following posts don't appear unmotivated

3. It's actually $\displaystyle y = -\frac{\cos{x}}{x} + \frac{c}{x}$...

4. what happened to 1/pi ? how did it become c/ x? didnt get that

5. Originally Posted by Riazy
what happened to 1/pi ? how did it become c/ x? didnt get that
Prove it just went back to the point right after you integrated

$xy=-\cos(x)+C$ Now if you isolate y you get

$\displaystyle y=-\frac{\cos(x)}{x}+\frac{C}{x}$ Now we can use the initial conditions to solve for C

$\displaystyle 0=-\frac{\cos(\pi)}{\pi}+\frac{C}{\pi} \implies C=-1$

,

,

,

,

,

,

,

,

,

,

,

,

,

,

# sin (x y)=ycosx

Click on a term to search for related topics.