Solve $u'=u \ \cos(x)$

126 Views Asked by At

\begin{cases}u'=u \ \cos(x) \\ u(0)=1 \end{cases}


$$u'=u \ \cos(x)$$

$$\frac{du}{dx}=u \ \cos(x)$$

$$\frac{du}{u}=\cos(x) \ dx$$

$$\int \frac{du}{u}=\int \cos(x) \ dx$$

$$\ln \lvert u \lvert=\sin(x)+c$$

$$\lvert u \lvert =e^{\sin(x)+c}$$

$$u=\pm e^{\sin(x)+c}$$

Applying the initial condition:

$$1=\pm e^c$$ $$c=0$$


Eventually:

$$u=e^{\sin(x)}$$

Is it correct?

Thanks

2

There are 2 best solutions below

0
On BEST ANSWER

Using exponential rules, $$e^{\sin(x) + c} = e^{\sin(x)}e^c$$ which is equivalent to $ce^{\sin(x)}$ so when you plug in the initial condition $u(0) = 1$, $c = 1$ and not $0$. Or if you were not simplifying $e^c$ to $c$ then $c = 0$ because $e^0 e^0$ would be $1$.

0
On

Your answer and your methodology are correct.

Note that you really did not need the negative sign in $$ 1=\pm e^c$$ considering your initial condition.