0

$$\frac{dy}{dx} = y\sin x-2\sin x, \quad y(0) = 0.$$

Initial Value Problem

Hint says: Find an integrating factor

Henry T. Horton
  • 18,318
  • 5
  • 60
  • 77
Ryan
  • 79
  • 2
    Welcome to this Math Stack Exchange. Notice that your "question" is kind of a rude implication that the community is just expected to compute your answer, like a robot. It's more helpful if you actually ask a question, and give as much information as you can about why you are stuck. For example, do you not know what an "integrating factor " is? – 2'5 9'2 Oct 04 '12 at 21:05
  • No I do not. What is an integrating factor? – Ryan Oct 04 '12 at 21:06
  • I still cannot figure this out. – Ryan Oct 04 '12 at 21:30

4 Answers4

2

When we have a linear differential equation $y'+P(x)y=Q(x)$ of order 1 then $\mu (x)=e^{\int P(x) dx}$will be an integrating factor. In your case, it is $\mu(x)=e^{\cos(x)}$. Now multiply it both sides of the equation and you see $$d(e^{\cos(x)}y)=-2\sin(x)e^{\cos(x)}$$ The rest is easy.

Mikasa
  • 67,374
2

If a differential equation has the form

$$ y'(x)+p(x)y(x)=q(x)\,, \quad (1), $$ then the integrating factor is given by

$$ m(x)= {\rm e}^{\int p(x) dx}\,. $$

You need to write your ode in the form of $(1)$ and then find the integrating factor. Then just multiply the original equation by the interating factor and integrate

$$ (m(x)y)'= q(x) \Rightarrow \frac{d}{dx}(e^{\cos(x)}y)=-2\sin(x)e^{\cos(x)} $$

$$ \Rightarrow e^{\cos(x)}y(x)=2\int e^{\cos(x)}(-\sin(x))dx + C = 2e^{\cos(x)} +C $$

$$ y(x)= 2 + C \,{\rm e}^{-\cos(x)} \,.$$

To find $C$, you need to use the initial condition $y(0)=0$,

$$ y(0) = 0 = 2 + C{\rm e}^{-\cos(0)} \Rightarrow C = -2 {\rm e}$$

Substituting the value of $C$ in the solution gives

$$ y(x)= 2 - 2 \,{\rm e}^{1-\cos(x)} \,.$$

2

The simplest type of this ODE is that separable rather than linear. So it is not necessary to treat it as a linear ODE to solve.

$\dfrac{dy}{dx}=y\sin x-2\sin x$

$\dfrac{dy}{dx}=(y-2)\sin x$

$\dfrac{dy}{y-2}=\sin x~dx$

$\int\dfrac{dy}{y-2}=\int\sin x~dx$

$\ln(y-2)=-\cos x+c$

$y-2=Ce^{-\cos x}$

$y=Ce^{-\cos x}+2$

$y(0)=0$ :

$Ce^{-1}+2=0$

$C=-2e$

$\therefore y=-2ee^{-\cos x}+2=2-2e^{1-\cos x}$

doraemonpaul
  • 16,178
  • 3
  • 31
  • 75
0

Hint: Write it as $\frac{y'}{y-2}=\sin(x)$ and integrate.

draks ...
  • 18,449
  • The answer above is correct. However, if the person asking the question insists you use the hint, then you write the ODE as $ – Stefan Smith Oct 04 '12 at 21:06