General solution of the differential equation: y' cot x + y = 2

868 Views Asked by At

I have to find the general solution of the differential equation:$ y$' $cot$ $x$ + $y$ = $2$. And determine the integration constant using the initial condition $y$(0) = $1$. Additionally presenting it in a explicit form.

Just wondering how I am going and if I am on the right track cheers,

First re-write $y$' $cot$ $x$ + $y$ = $2$ in the standard form. $y$^' $cot$$x$+$y$=$2$ $y$^'+$y$/cot$⁡x$ =$2$/$cot⁡x$ $y$^'+$y$tan $x$=$2$ $tan$$⁡x$

Therefore form the equation, $p$(x)=tan$⁡x$ and, $q$(x)=$2$ tan$⁡x$ Finding the integrating factor, $I$(x)≡$e^∫p$(x)$dx$=$e$^∫$tan$⁡〖$x$ $dx$〗 =$e$^(-ln⁡|$cos$$⁡x$ | )

Multiplying integrating factor into the standard form,

〖$e$^(-ln⁡|$cos$$⁡x$ | ) $y$〗^'+($ye$^($-ln$⁡|$cos⁡x$ | ))/$cot⁡x$ =〖$2e$〗^(-$ln$⁡|$cos⁡x$ | )/$cot⁡x$

With the equation being in the form of.

$d/dx$ ($e$^($-ln⁡$|$cos⁡x$ | )$ y$)= 〖$2e$〗^($-ln$⁡|$cos⁡x$ | )/$cot⁡x$

$d/dx$ ($e$^($-ln$⁡|$cos⁡x$ | ) $y$)= 〖$2e$〗^($-ln⁡$|$cos⁡x$ | ) $tan⁡x$

Then integrating this equation produces,

∫〖$d/dx$ ($e$^($-ln$⁡|$cos⁡x$ | ) $y$)=∫〖〖$2e$〗^($-ln$⁡|$cos⁡x$ | ) $tan⁡x$ 〗〗

($e$^($-ln⁡$|$cos⁡x$ | ) $y$)=∫〖〖$2e$〗^($-ln$|$cos⁡x$ | ) $tan⁡x$ 〗

=$2$∫〖$e$^($-ln$⁡|$cos⁡x$ | ) $tan⁡x$ 〗

focusing on ∫〖$e$^($-ln⁡$|$cos⁡x$ | ) $tan⁡x$ 〗

∫〖$e$^($-ln⁡$|$cos⁡x$ | ) $tan⁡x$ 〗=($e$^($-ln$⁡|$cos⁡x$ | )∙$-ln$⁡|$cos⁡x$ | )-($e$^($-ln$⁡|$cos⁡x$ | )∙$tan⁡x$ )

=($e$^($-ln⁡$|$cos⁡x$ | )∙$-ln$⁡|$cos⁡x$ | )-($e$^($-ln$⁡|$cos⁡x$ | )∙$tan⁡x$ )

1

There are 1 best solutions below

1
On

There's an easier way to do this problem without integrating factors. Notice that this equation is separable and can be written in the form

$$ \frac{dy}{2-y} \;\; =\;\; \tan x dx. $$

Recalling that $\int \tan xdx = -\ln|\cos x| + C$ and noting that $\int\frac{dy}{2-y} = -\ln(2-y)$, finding the solution should be easier now.