# Thread: Question regards integral calculus

1. ## Question regards integral calculus

Hi its me again and I have return with more question that I currently got stuck on
************************************************** *********

For the following differential equation

$\frac{dy}{dx}=\frac{2cos^2(x)-sin^2(x)+y^2}{2cos(x)}$ , $\frac{-\pi}{2}

show that the substitution $y(x)=sin(x)+\frac{1}{u(x)}$ , yields the differential equation for $u(x)$

$\frac{du}{dx}=-u*tan(x)-\frac{1}{2}sec(x)$

Hence find the solution $y(x)$ to the original differential equation that satisfies the condition $y(0)=2$. Find the interval on which the solution to the initial value problem is defined.

************************************************** **********
So I first set out to integrate $\frac{dy}{dx}$ first, however I have a problem that I do not know how to move $y^2$ to the otherside of the equation

e.g. $\frac{1}{y^2}dy=\frac{2cos^2(x)-sin^2(x)}{2cos(x)}dx$

what I did is

$\int 1 dy = \int cos(x)dx -\frac{1}{2}\int sin(x)tan(x)dx + \frac{y^2}{2}\int\frac{1}{cos(x)}dx$

I integrated $\int sin(x)tan(x)dx$ by using integration by parts with u=tan(x) and $\frac{dv}{dx}=sin(x)$

so the equation become

$y=sin(x)+\frac{cos(x)tan(x)}{2}-\frac{sin(x)}{2}+\frac{y^2}{2sin(x)}$ + C

I'm certain that my integration is wrong, since y(0)=2 will result in $\frac{y^2}{0}$

The same problem also applies to $\frac{du}{dx}=-u*tan(x)-\frac{1}{2}sec(x)$

since I do not know how to move, the $y$ and $u$ to the other side of the equation. So can any body tell me how to integrate this question?

Thanks
Junks

P.S. I finally posted this in latex

edit: I'll try to use First Order, O.D.E but since $y^2$will first order O,D,E work there?

By first order O.D. E

$\frac{du}{dx}=-u*tan(x)-\frac{1}{2}sec(x)$

I found my $u$ to be $u=\frac{-1}{2}cos(x)tan(x)$

is this correct?

2. ## Re: Question regards integral calculus

Well when you make the substitution \displaystyle \begin{align*} y = \sin{(x)} + \frac{1}{u} \end{align*} then that means \displaystyle \begin{align*} \frac{dy}{dx} = \cos{(x)} - \frac{1}{u^2}\,\frac{du}{dx} \end{align*}, so substituting into your DE you get

\displaystyle \begin{align*} \frac{dy}{dx} &= \frac{2\cos^2{(x)} - \sin^2{(x)} + y^2}{2\cos{(x)}} \\ \cos{(x)} - \frac{1}{u^2}\,\frac{du}{dx} &= \frac{2\cos^2{(x)} - \sin^2{(x)} + \left[ \sin{(x)} + \frac{1}{u} \right] ^2 }{2\cos{(x)}} \\ \cos{(x)} - \frac{1}{u^2}\,\frac{du}{dx} &= \frac{2\cos^2{(x)} - \sin^2{(x)} + \sin^2{(x)} + \frac{2}{u}\sin{(x)} + \frac{1}{u^2}}{2\cos{(x)}} \\ \cos{(x)} - \frac{1}{u^2}\,\frac{du}{dx} &= \frac{2\cos^2{(x)} + \frac{2}{u}\sin{(x)} + \frac{1}{u^2}}{2\cos{(x)}} \\ \cos{(x)} - \frac{1}{u^2}\,\frac{du}{dx} &= \cos{(x)} + \frac{1}{u}\,\frac{\sin{(x)}}{\cos{(x)}} + \frac{1}{u^2}\,\frac{1}{2\cos{(x)}} \\ -\frac{1}{u^2}\,\frac{du}{dx} &= \frac{1}{u}\,\frac{\sin{(x)}}{\cos{(x)}} + \frac{1}{u^2}\,\frac{1}{2\cos{(x)}} \\ \frac{du}{dx} &= -u\,\frac{\sin{(x)}}{\cos{(x)}} - \frac{2}{\cos{(x)}} \\ \frac{du}{dx} + \frac{\sin{(x)}}{\cos{(x)}}\,u &= -\frac{2}{\cos{(x)}} \end{align*}

This is now first order linear and so can be solved using an integrating factor.

3. ## Re: Question regards integral calculus

Thank you, "Prove it" I got the idea of solving this problem now

4. ## Re: Question regards integral calculus

I have more question to ask in regards to this same question.

so I got $u=\frac{-1}{2}cos(x)tan(x)$

since $y(x)=sin(x)+\frac{1}{u}$ then $y(x)=sin(x)-\frac{-2}{cos(x)tan(x)}$

I subbed this value of y into $\frac{dy}{dx}=\frac{2cos^2(x)-sin^2(x)+y^2}{2cos(x)}$

the equation become $\frac{dy}{dx}=cos(x)-\frac{sin^2(x)}{2cos(x)}+\frac{sin^2(x)+\frac{4}{s in^2(x)} -4}{2cos(x)}$

$\int cos(x) + \frac{4}{sin^2(x)2cos(x)}-\frac{2}{cos(x)} dx$

If I did not made any mistake in the process, how do you integrate this equation $\int\frac{4}{sin^2(x)2cos(x)} dx$?

************************************************** *******************************************
I think I need to integrate $\frac{dy}{dx}$ so i can solve for this

"Hence find the solution $y(x)$ to the original differential equation that satisfies the condition $y(0)=2$. Find the interval on which the solution to the initial value problem is defined."

5. ## Re: Question regards integral calculus

Originally Posted by junkwisch
If I did not made any mistake in the process, how do you integrate this equation $\int\frac{4}{sin^2(x)2cos(x)} dx$?

************************************************** *******************************************
I think I need to integrate $\frac{dy}{dx}$ so i can solve for this

"Hence find the solution $y(x)$ to the original differential equation that satisfies the condition $y(0)=2$. Find the interval on which the solution to the initial value problem is defined."
I haven't checked whether your working is correct, but use integration by parts to compute the above integral.
$\int u' v \ dx = uv - \int uv' \ dx$

$2 \int \csc^2 x \sec x \ dx, \ u' = \csc^2 x, \ v = \sec x$.

Recall $\int \csc^2 x \ dx = - \cot x, \ \frac{d}{dx} \sec x = \sec x \tan x$.

6. ## Re: Question regards integral calculus

It should be du/dx = - tan x - sec x/2

not the du/dx = -u tanx - 2sec x given above.

you then take the onto the LHS and you now have a linear first order ODE.

integrating factor is sec x.

get down to u = -sinx/2 + C cos x

from y= sinx +1/u, u = 1/(y-sinx)

Im not sure where to go from here, can anyone help solving for y?

7. ## Re: Question regards integral calculus

I guess we didnt have exactly the same question

Im not sure if what i did is right, but try sub u into y then y into dy/dx

P.s. writing on my phone right now so I couldnt write a latex