0

$$y' + (\cos x)y = 4 \cos x$$

This can be done using the differential factor. I would say that the differential factor should be $e^{D\cos x} = e^{-\sin x}$. However I know it should be $e^{\sin x}$ since the answer is $$ y = 4+Ce^{-\sin x}$$

Can someone explain this to me?

If I could get a nice way to solve

$$ \int 4 \cos x e^{sinx} dx $$

It would also be nice, I think there's a trick you can use instead of subsitute $tan \frac{x}{2} = t$

iveqy
  • 1,327

4 Answers4

3

We have \begin{align} ye^{\sin{x}} &=\int 4\cos{x}e^{\sin{x}}dx\\ &=4\int e^{\sin{x}}\operatorname{d}(\sin{x})\\ &=4e^{\sin{x}}+C \end{align} Hence $$y=4+Ce^{-\sin{x}}$$

SuperAbound
  • 5,554
3
  • Notice that $y=4$ is a remarquable particular solution for the ODE.
  • The homogeneous ODE $$y'+(\cos x) y=0\iff y=C\exp\left(-\int\cos xdx\right)=C\exp(-\sin x)$$ so the general solution is the sum of the particular solution with a solution of the homogeneous ODE.
2

$$y' = (4-y)\cos x \stackrel{*}{\Rightarrow} \frac{dy}{4-y} = \cos x\ dx\Rightarrow \int \frac{dy}{y-4} = -\int\cos x\ dx \Rightarrow \\\ln y-4 = -\sin x + C \Rightarrow y - 4 = Ke^{-\sin{x}} \Rightarrow y = Ke^{-\sin x}+4$$ With $K > 0$

$*$ Unless $y = 4$ wich is also a solution (that can be achieved considering $K \geq 0$)

Darth Geek
  • 12,296
1

HINT:

Integrating Factor

$$e^{\int (\cos x)\ dx}=e^{\sin x}$$