Solve Linear ODE Using Integrating Factor

1s1
Messages
20
Reaction score
0

Homework Statement



Solve the initial value problem:
$$sin(x)y' + ycos(x) = xsin(x), y(2)= \pi/2$$


Homework Equations





The Attempt at a Solution



Recognizing it as a Linear First-Order Equation:$$\frac{dy}{dx}+y\frac{cosx}{sinx}=x$$
$$P(x)=\frac{cosx}{sinx}$$
Integrating factor: $$e^{\int \frac{cosx}{sinx}dx}=sinx$$

Multiplying the ODE by the integrating factor:
$$\frac{d}{dx}[ysinx] = xsinx$$

Integrating both sides: $$ysinx = \int xsinx dx$$
$$y=1-\frac{xcosx}{sinx}+C$$
Solving for C: $$C=1$$
$$y=2-\frac{xcosx}{sinx}$$

Apparently this solution is incorrect, but I can't figure out why?
 
Physics news on Phys.org
From this line

ysinx=∫xsinxdx

you should get

ysinx = sinx - xcosx +C

then divide by sinx.
 
Thanks! When I divided through by ##sin(x)## from the step you suggested, I had forgotten to divide ##C## by ##sin(x)##. I tend to ignore the constants which is a big mistake. Thanks for the help!
 
maybe you have missed out some steps of what you did, it is not evident that you have worked out your integration factor or multiplied by it.

You don't need an integration factor and can go straight from line 1 to line 5.
 
Prove $$\int\limits_0^{\sqrt2/4}\frac{1}{\sqrt{x-x^2}}\arcsin\sqrt{\frac{(x-1)\left(x-1+x\sqrt{9-16x}\right)}{1-2x}} \, \mathrm dx = \frac{\pi^2}{8}.$$ Let $$I = \int\limits_0^{\sqrt 2 / 4}\frac{1}{\sqrt{x-x^2}}\arcsin\sqrt{\frac{(x-1)\left(x-1+x\sqrt{9-16x}\right)}{1-2x}} \, \mathrm dx. \tag{1}$$ The representation integral of ##\arcsin## is $$\arcsin u = \int\limits_{0}^{1} \frac{\mathrm dt}{\sqrt{1-t^2}}, \qquad 0 \leqslant u \leqslant 1.$$ Plugging identity above into ##(1)## with ##u...
Back
Top