Welcome to our community

Be a part of something great, join today!

Solving a differential equation

Pranav

Well-known member
Nov 4, 2013
428
Problem:
Solve:
$$\frac{x\,dx-y\,dy}{x\,dy-y\,dx}=\sqrt{\frac{1+x^2-y^2}{x^2-y^2}}$$

Attempt:
I rewrite the given differential equation as:
$$\frac{(1/2)d(x^2-y^2)}{x^2d(y/x)}=\sqrt{\frac{1+x^2-y^2}{x^2-y^2}}$$

I thought of using the substitution $x^2-y^2=t^2$ but that doesn't seem to help. The following is what I get after the substitution:
$$\frac{t\sqrt{x^2-t^2}\,dt}{t\,dx-x\,dt}=\sqrt{1+t^2}$$
But I don't see how to proceed from here. :(

Any help is appreciated. Thanks!
 

Pranav

Well-known member
Nov 4, 2013
428
I tried isolating $dy/dx$,
$$\frac{dy}{dx}=\frac{x\sqrt{x^2-y^2}+y\sqrt{1+x^2-y^2}}{y\sqrt{x^2-y^2}+x\sqrt{1+x^2-y^2}}$$
But this still doesn't ring a bell. :(

Please help.
 

MarkFL

Administrator
Staff member
Feb 24, 2012
13,775
I find that by switching to polar coordinates, one obtains a linear ODE in $r$ and $\theta$. :D
 

Pranav

Well-known member
Nov 4, 2013
428
I find that by switching to polar coordinates, one obtains a linear ODE in $r$ and $\theta$. :D
Hi MarkFL! :)

I tried substituting $x=r\cos\theta$ and $y=r\sin\theta$ and got the following DE
$$\cos(2\theta)\frac{dr}{d\theta}-r\sin(2\theta)=\sqrt{\frac{1+r^2 \cos (2\theta)}{\cos(2\theta)}}$$

How do I solve the above DE? I have got both $r$ and $\theta$ inside the radical, how to deal with this? :confused:
 

MarkFL

Administrator
Staff member
Feb 24, 2012
13,775
Hi MarkFL! :)

I tried substituting $x=r\cos\theta$ and $y=r\sin\theta$ and got the following DE
$$\cos(2\theta)\frac{dr}{d\theta}-r\sin(2\theta)=\sqrt{\frac{1+r^2 \cos (2\theta)}{\cos(2\theta)}}$$

How do I solve the above DE? I have got both $r$ and $\theta$ inside the radical, how to deal with this? :confused:
Yes, I see now that I made an error on my worksheet and dropped the $r^2$ under the radical...darn...I should have written instead:

\(\displaystyle \frac{dr}{d\theta}-\tan(2\theta)r=\sqrt{\frac{1+r^2\cos(2\theta)}{ \cos^3(2\theta)}}\)

That is clearly not linear. Back to the drawing board...:D
 

Pranav

Well-known member
Nov 4, 2013
428
Yes, I see now that I made an error on my worksheet and dropped the $r^2$ under the radical...darn...I should have written instead:

\(\displaystyle \frac{dr}{d\theta}-\tan(2\theta)r=\sqrt{\frac{1+r^2\cos(2\theta)}{ \cos^3(2\theta)}}\)

That is clearly not linear. Back to the drawing board...:D
Thanks MarkFL for the effort you are putting into this problem. :)

BTW, the answer is:
$$\sqrt{x^2-y^2}+\sqrt{1+x^2-y^2}=\frac{c(x+y)}{\sqrt{x^2-y^2}}$$
 

Ackbach

Indicium Physicus
Staff member
Jan 26, 2012
4,191
I wonder if the substitution
\begin{align*}
x&= r \cosh( \theta) \\
y &= r \sinh( \theta)
\end{align*}
might not be better, as you get $x^{2}-y^{2}=r^{2}$.
You'd have
\begin{align*}
dx &= \cosh( \theta) \, dr+r \, \sinh( \theta) \, d\theta \\
dy &= \sinh( \theta) \, dr+r \, \cosh( \theta) \, d\theta.
\end{align*}
I'm still computing what this transforms the DE into...
 

Ackbach

Indicium Physicus
Staff member
Jan 26, 2012
4,191
If my calculations are correct, the DE reduces down to
$$dr=\sqrt{1+r^{2}} \, d\theta,$$
which is separable.
 

Pranav

Well-known member
Nov 4, 2013
428
If my calculations are correct, the DE reduces down to
$$dr=\sqrt{1+r^{2}} \, d\theta,$$
which is separable.
That's awesome! :D

BTW, I seem to be getting something different. I continue from my first post and then use the substitutions suggested by you. I had:

$$\frac{(1/2)\,d(x^2-y^2)}{x^2\,d(y/x)}=\sqrt{\frac{1+x^2-y^2}{x^2-y^2}}$$

We have $x^2-y^2=r^2$ and $y/x=\tanh (\theta) \Rightarrow d(y/x)=\text{sech}^2(\theta)d\theta$. Substituting, I get
$$\frac{r\,dr}{d\theta}=\frac{\sqrt{1+r^2}}{r}$$
$$\Rightarrow \frac{r^2dr}{\sqrt{1+r^2}}=d\theta$$

Solving the differential equation, I get
$$\frac{r}{2}\sqrt{1+r^2}-\frac{\sinh^{-1}(r)}{2}=\theta+c$$
Am I right so far?

EDIT: I am wrong. Please wait, I make a new post. :eek:
 

Pranav

Well-known member
Nov 4, 2013
428
Continuing from $dr=\sqrt{1+r^2}d\theta$, I get
$$\frac{dr}{\sqrt{1+r^2}}=d\theta$$
Solving the D.E, I get
$$\sinh^{-1}(r)=\theta+c$$
We have, $r=\sqrt{x^2-y^2}$ and $\theta=\tanh^{-1}(y/x)=(1/2)ln((x+y)/(x-y))$. Substituting,
$$\ln(\sqrt{x^2+y^2}+\sqrt{1+x^2-y^2})=\ln\left(\sqrt{\frac{x+y}{x-y}}\right)+\ln(K)$$
$$\Rightarrow \sqrt{x^2+y^2}+\sqrt{1+x^2-y^2}=K\sqrt{\frac{x+y}{x-y}}=\frac{K(x+y)}{\sqrt{x^2-y^2}}$$
Thanks a lot Ackbach and MarkFL! :)
 

Ackbach

Indicium Physicus
Staff member
Jan 26, 2012
4,191
$$\ln(\sqrt{x^2+y^2}+\sqrt{1+x^2-y^2})=\ln\left(\sqrt{\frac{x+y}{x-y}}\right)+\ln(K)$$
$$\Rightarrow \sqrt{x^2+y^2}+\sqrt{1+x^2-y^2}=K\sqrt{\frac{x+y}{x-y}}=\frac{K(x+y)}{\sqrt{x^2-y^2}}$$
Assume you meant
$$\Rightarrow \sqrt{x^2-y^2}+\sqrt{1+x^2-y^2}=K\sqrt{\frac{x+y}{x-y}}=\frac{K(x+y)}{\sqrt{x^2-y^2}},$$
right?
 

Pranav

Well-known member
Nov 4, 2013
428
Assume you meant
$$\Rightarrow \sqrt{x^2-y^2}+\sqrt{1+x^2-y^2}=K\sqrt{\frac{x+y}{x-y}}=\frac{K(x+y)}{\sqrt{x^2-y^2}},$$
right?
Yes. :eek:
 

MarkFL

Administrator
Staff member
Feb 24, 2012
13,775
I wonder if the substitution
\begin{align*}
x&= r \cosh( \theta) \\
y &= r \sinh( \theta)
\end{align*}
might not be better, as you get $x^{2}-y^{2}=r^{2}$.
You'd have
\begin{align*}
dx &= \cosh( \theta) \, dr+r \, \sinh( \theta) \, d\theta \\
dy &= \sinh( \theta) \, dr+r \, \cosh( \theta) \, d\theta.
\end{align*}
I'm still computing what this transforms the DE into...
Very nicely done! :cool:
 

Pranav

Well-known member
Nov 4, 2013
428