# Thread: Integration of a differential equation

1. ## Integration of a differential equation

Hi,

I am unsure if I am getting the correct answer to my problem, I have to find y

$\frac{dy}{dx} = y\cos(x)$ which goes to

$\int\frac{1}{\cos(x)\cdot dx} = \int\frac{y}{dy}$ then

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

$y = \sqrt{ln(\cos(x)) + c}$

Is this correct, if not where am i going wrong?

Thanks

2. Originally Posted by Beard
Hi,

I am unsure if I am getting the correct answer to my problem, I have to find y

$\frac{dy}{dx} = y\cos(x)$ which goes to

$\int\frac{1}{\cos(x)\cdot dx} = \int\frac{y}{dy}$ then

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

$y = \sqrt{ln(\cos(x)) + c}$

Is this correct, if not where am i going wrong?

Thanks
Dear Beard,

$\frac{dy}{dx} = y\cos~x$

$\frac{1}{y}\frac{dy}{dx}=cos~x$

Now integrate both sides with respect to x,

$\int{\frac{1}{y}\frac{dy}{dx}}dx=\int{cos~x}~dx$

$\int{\frac{1}{y}}dy=sin~x+C$ ; Cis an arbitary constant.

$ln\mid{y}\mid=sin~x+C$

Hope this will help you.

3. Nice and clear to follow thankyou

4. And never, ever again write " $\int \frac{f(x)}{dx}$"!!!