# Solve in two different ways (2)

Printable View

• Sep 26th 2011, 11:05 PM
alexmahone
Solve in two different ways (2)
Solve in two different ways.

$\frac{dy}{dx}=\frac{\sqrt{y}-y}{\tan x}$

Could someone please check the finer details of my solution, such as signs of integration constants and modulus signs?

Separable:

$\frac{dy}{\sqrt{y}-y}=\frac{dx}{\tan x}$

$\frac{1}{2\sqrt{y}}\frac{2}{1-\sqrt{y}}dy=\cot xdx$

$\ln |\sin x|=\int \frac{1}{2\sqrt{y}}\frac{2}{1-\sqrt{y}}dy$

Let $u=\sqrt{y}$.

$du=\frac{dy}{2\sqrt{y}}$

$\int \frac{1}{2\sqrt{y}}\frac{2}{1-\sqrt{y}}dy=\int \frac{2}{1-u}du$

$=-2\ln |1-u|+C_1$

$=-2\ln |1-\sqrt{y}|+C_1$

$\ln |\sin x|=-2\ln |1-\sqrt{y}|+C_1$

$\ln |\sin x|(1-\sqrt{y})^2=C_1$

$|\sin x|(1-\sqrt{y})^2=e^{C_1}=C_2$, where $C_2$ is a positive constant.

$(1-\sqrt{y})^2=C_2|\sin x|^{-1}$

$1-\sqrt{y}=\pm \sqrt{C_2}|\sin x|^{-1/2}$

$\sqrt{y}=1\mp \sqrt{C_2}|\sin x|^{-1/2}$

$\sqrt{y}=1+C|\sin x|^{-1/2}$, where $C=\mp \sqrt{C_2}$.

$y(x)=1+C^2|\sin x|^{-1}+2C|\sin x|^{-1/2}$

Bernoulli:

$\frac{dy}{dx}+\frac{y}{\tan x}=\frac{\sqrt{y}}{\tan x}$

Let $u=y^{1/2}$.

$y=u^2$

$\frac{dy}{dx}=2u\frac{du}{dx}$

$2u\frac{du}{dx}+\frac{u^2}{\tan x}=\frac{u}{\tan x}$

$\frac{du}{dx}+\frac{u}{2\tan x}=\frac{1}{2\tan x}$

$\frac{du}{dx}+\frac{u\cot x}{2}=\frac{\cot x}{2}$

The integrating factor is $\exp\left(\int \frac{\cot x}{2}\right)=\exp\left(\frac{1}{2}\ln |\sin x|\right)=|\sin x|^{1/2}$.

$|\sin x|^{1/2}\frac{du}{dx}+|\sin x|^{1/2}\frac{u\cot x}{2}=|\sin x|^{1/2}\frac{\cot x}{2}$

$\frac{d}{dx}(u|\sin x|^{1/2})=|\sin x|^{1/2}\frac{\cot x}{2}$

$u|\sin x|^{1/2}=|\sin x|^{1/2}+C$

$u=1+C|\sin x|^{-1/2}$

$y^{1/2}=1+C|\sin x|^{-1/2}$

$y(x)=1+C^2|\sin x|^{-1}+2C|\sin x|^{-1/2}$
• Sep 27th 2011, 07:34 AM
Ackbeet
Re: Solve in two different ways (2)
The beauty of DE's is it's often much easier to check your own solution than to find the solution in the first place. Just plug your solution in to the DE and see if you get equality! You got the same answer both ways, which is a good sign.
• Sep 27th 2011, 07:50 AM
alexmahone
Re: Solve in two different ways (2)
Quote:

Originally Posted by Ackbeet
The beauty of DE's is it's often much easier to check your own solution than to find the solution in the first place. Just plug your solution in to the DE and see if you get equality! You got the same answer both ways, which is a good sign.

How would I differentiate $|\sin x|^{-1}$ and $|\sin x|^{-1/2}$.

Also, are the modulus signs really necessary?
• Sep 27th 2011, 07:53 AM
Ackbeet
Re: Solve in two different ways (2)
Note that

$\frac{d}{dx}\,|x|=\frac{x}{|x|}=\text{sgn}(x),$

the signum function.

You can use the chain rule multiple times to get the final result.
• Sep 27th 2011, 09:40 AM
alexmahone
Re: Solve in two different ways (2)
Quote:

Originally Posted by Ackbeet
Note that

$\frac{d}{dx}\,|x|=\frac{x}{|x|}=\text{sgn}(x),$

the signum function.

You can use the chain rule multiple times to get the final result.

$\frac{dy}{dx}=C^2*-1*|\sin x|^{-2}sgn(\sin x)\cos x$ $+2C*-\frac{1}{2}|\sin x|^{-3/2}sgn(\sin x)\cos x$

$=-C^2|\sin x|^{-2}sgn(\sin x)\cos x-C|\sin x|^{-3/2}sgn(\sin x)\cos x$

$\frac{\sqrt{y}-y}{\tan x}=\frac{-C^2|\sin x|^{-1}-C|\sin x|^{-1/2}}{\tan x}$

$=\frac{(-C^2|\sin x|^{-1}-C|\sin x|^{-1/2})\cos x}{\sin x}$

$=\frac{(-C^2|\sin x|^{-2}-C|\sin x|^{-3/2})\cos x}{\sin x|\sin x|^{-1}}$ (Multiplying numerator and denominator by $|\sin x|^{-1}$.)

$=\frac{(-C^2|\sin x|^{-2}-C|\sin x|^{-3/2})\cos x}{sgn(\sin x)}$

$=(-C^2|\sin x|^{-2}-C|\sin x|^{-3/2})\cos xsgn(\sin x)$

$=-C^2|\sin x|^{-2}sgn(\sin x)\cos x-C|\sin x|^{-3/2}sgn(\sin x)\cos x$

$\frac{dy}{dx}=\frac{\sqrt{y}-y}{\tan x}$

QED