# Differential equation : $u' = \sin(t)\exp(u)$

I have a question about taking the absolute value of an argument when working with logarithm. I found this solution $u(t) = -\log(\cos(t)+C)$. But i am not sure if I have to take $u(t)=-\log(|\cos(t)+C|)$. Can someone clarify this ?

-

In general, $\log x$ has the domain $\{x: x\in \mathbb{R}\wedge x > 0\}$ when the range is confined to the real numbers. Your solution is $u(t)=-\log(\cos(t)+C)$. We write $u(t)=-\log|\cos(t)+C|$ in order to ensure $u(t)$ is defined for all values of $t$ (excluding the case of $t$ such that $|\cos(t)+C|=0$ since $-\log 0$ is undefined.)
If you don't know why $-\log 0$ is undefined, just ask yourself: Does there exist a solution to the equation $-\log 0=y$ given that this equation is equivalent to $e^{-y}=0$?
The reason for usually having an absolute value inside the logarithm is that the logarithm isn't defined for negative values in real calculus. Assuming this is real calculus, the logarithm is only defined for all $t$ if $C>1$.
I think you mean if $C>1$; consider $t=\frac{3\pi}{2}$ –  Daniel Littlewood Dec 2 '12 at 18:40
Wait a second. I think you mean $\cos(t)+C > 0$. (This simplifies to what @DanielLittlewood said considering the range of $\cos(t)$: $-1\le \cos (t)\le 1$.) –  000 Dec 2 '12 at 18:41