<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass[a4paper,12pt]{article}
\newcommand{\ds}{\displaystyle}
\newcommand{\un}{\underline}
\parindent=0pt
\begin{document}

{\bf Question}

Find the general solution of the following differential equations

\begin{description}
\item[(i)]
$xy\ds\frac{dy}{dx}=y^2-x^2$

\item[(ii)]
$\ds\frac{dy}{dx}=\ds\frac{xy}{x^2+y^2}$

\item[(iii)]
$x(y+x)\ds\frac{dy}{dx}=y(y-x)$

\item[(iv)]
$x^2\ds\frac{dy}{dx}=xy-y^2$
\end{description}

\medskip

{\bf Answer}
\begin{description}
\item[(i)]
${}$

$xy\ds\frac{dy}{dx}=y^2-x^2$ is of the type
$P(x,y)\ds\frac{dy}{dx}+Q(x,y)=0$ with

$\left.\begin{array} {lcl} P(x,y)=xy &amp; \Rightarrow &amp;\rm{degree}
2\\ Q(x,y)=x^2-y^2 &amp; \Rightarrow &amp; \rm{degree} 2 \end{array}
\right\} \Rightarrow \un{\rm{homogenous}}$

Thus use $y=vx \Rightarrow \ds\frac{dy}{dx}=v+x\ds\frac{dv}{dx}$
(where $v=v(x)$)

and divide both sides through by $x^2$ etc......

$$\begin{array} {rcl} xy\ds\frac{dy}{dx} &amp; = &amp; y^2-x^2\\
\Rightarrow \ds\frac{dy}{dx} &amp; = &amp; \ds\frac{y^2-x^2}{xy}\\&amp; &amp;
\rm{divide\ top\ and\ bottom\ of\ RHS\ by}\ x^2\\ \Rightarrow
\ds\frac{dy}{dx} &amp; = &amp;
\ds\frac{(\frac{y}{x})^2-1}{(\frac{y}{x})}\end{array}$$

Substitute $\ds\frac{dy}{dx}=v+x\ds\frac{dv}{dx}$ on LHS and
$y=vx$ on RHS

$\begin{array} {crcl} &amp; v+x\ds\frac{dv}{dx} &amp; = &amp;
\ds\frac{v^2-1}{v}\\ \Rightarrow &amp; x\ds\frac{dv}{dx} &amp; = &amp;
\ds\frac{v^2-1}{v}-v\\ \rm{or} &amp; x\ds\frac{dv}{dx}&amp; = &amp;
-\ds\frac{1}{v} \end{array}$

\newpage
This is now variables separable. Hence:

\begin{eqnarray*} \ds\int v \,dv &amp; = &amp; -\ds\int\ds\frac{dx}{x}\\
\Rightarrow \ds\frac{v^2}{2} &amp; = &amp; -\ln x+c\\ &amp; = &amp; -\ln x-\ln k\\
\Rightarrow \ds\frac{v^2}{2} &amp; = &amp; -\ln kx\\ &amp; = &amp;
\ln\left(\ds\frac{1}{kx}\right)\\ \Rightarrow v^2 &amp; = &amp;
2\ln\left(\ds\frac{1}{kx}\right)\\ \rm{or}\ v^2 &amp; = &amp;
\ln\left(\ds\frac{1}{k^2x^2}\right) \end{eqnarray*}

Now put back $y=vx$

$\begin{array} {cccl} &amp; \ds\frac{y^2}{x^2} &amp; = &amp;
\ln\left(\ds\frac{1}{k^2x^2}\right)\\ \rm{or}\ &amp;
\ds\frac{1}{k^2x^2} &amp; = &amp; e^{(\frac{y}{x})^2}\\ \rm{or} &amp; x^2 &amp; =
&amp; \ds\frac{1}{k^2}e^{-(\frac{y}{x})^2} \end{array}$

\newpage
\item[(ii)]
This is of the form $P\ds\frac{dy}{dx}+Q=0$

where $\left.\begin{array} {lcl} P(x,y)=x^2+y^2 &amp; \Rightarrow
&amp;\rm{degree} 2\\ Q(x,y)=-xy &amp; \Rightarrow &amp; \rm{degree} 2
\end{array} \right\} \Rightarrow \un{\rm{homogenous}}$

Thus set $y=vx$, $\Rightarrow\ds\frac{dy}{dx}=v+x\ds\frac{dv}{dx}$

Divide top and bottom by $x^2$:

$\ds\frac{dy}{dx}=\ds\frac{(\frac{xy}{x^2})}{(\frac{x^2+y^2}{x^2})}=
\ds\frac{(\ds\frac{y}{x})}{[1+(\frac{y}{x})^2]}$

or

$\begin{array} {crcl} &amp; v+x\ds\frac{dv}{dx} &amp; = &amp;
\ds\frac{v}{1+v^3}\\ \Rightarrow &amp; x\ds\frac{dv}{dx} &amp; = &amp;
\ds\frac{v}{1+v^3}-v\\ &amp; &amp; =&amp; \ds\frac{v-v-v^3}{1+v^2}\\ &amp; &amp; = &amp;
-\ds\frac{v^3}{1+v^2} \end{array}$

This is now variables separable. Thus

$\begin{array} {crcl} &amp;\ds\int\,dv \ds\frac{(1+v^2)}{-v^3} &amp; = &amp;
\ds\int\ds\frac{dx}{x}\\ \Rightarrow &amp;
-\ds\int\ds\frac{dv}{v^3}-\ds\int\ds\frac{dv}{v} &amp; = &amp;
\ds\int\ds\frac{dx}{x}\\ \Rightarrow &amp; \ds\frac{1}{2v^2}-\ln v &amp; =
&amp; \ln x+c\\ &amp; c=\ln k\\ \Rightarrow &amp;\ds\frac{1}{2v^2} &amp; = &amp; \ln
v+\ln x +\ln k\\ &amp; &amp; = &amp; \ln(kvx) \end{array}$

Thus $kvx=e^{\ds\frac{1}{2v^2}}$.

Now replace $y=vx$ to get \un{$ky=e^{\frac{x^2}{2y^2}}$}.

\newpage
\item[(iii)]
This is of the form $P(x,y)\ds\frac{dy}{dx}+Q(x,y)=0$

where $\left.\begin{array} {lcl} P(x,y)=xy+x^2 &amp; \Rightarrow
&amp;\rm{degree} 2\\ Q(x,y)=y^2-yx &amp; \Rightarrow &amp; \rm{degree} 2
\end{array} \right\} \Rightarrow \un{\rm{homogenous}}$

Thus rearrange to get

$$\ds\frac{dy}{dx}=\ds\frac{y^2-xy}{xy+x^2}$$

Divide RHS top and bottom by $x^2$

$$\ds\frac{dy}{dx}=\ds\frac{(\frac{y^2}{x^2}-\frac{xy}{x^2})}
{(\frac{xy}{x^2}-\frac{x^2}{x^2})}=\ds\frac{(\frac{y}{x})^2-(\frac{y}{x})}{(\frac{y}{x})+1}$$

Use $y=vx \Rightarrow \ds\frac{dy}{dx}=v+x\frac{dv}{dx}$

$\begin{array} {crcl} \Rightarrow &amp; v+x\ds\frac{dv}{dx} &amp; = &amp;
\ds\frac{v^2-v}{v+1}\\ \Rightarrow &amp; x\ds\frac{dv}{dx} &amp; = &amp;
\ds\frac{v^2-v}{v+1}-v\\ &amp; &amp; = &amp;
\ds\frac{v^2-v-v^2-v}{v+1}=\ds\frac{-2v}{v+1} \end{array}$

Thus

$$x\ds\frac{dv}{dx} =-\ds\frac{2v}{v+1}$$

This is variables separable, so

$\begin{array} {crcl} &amp; \ds\int\,dv \left(\ds\frac{v+1}{v}\right)
&amp; = &amp; -2\ds\int\ds\frac{dx}{x}\\ \Rightarrow &amp;
\ds\int\,dv+\ds\int\ds\frac{dv}{v} &amp; = &amp;
-2\ds\int\ds\frac{dx}{x}\\ \Rightarrow &amp; v+\ln v &amp; = &amp; -2\ln x+c\\
\Rightarrow &amp; \ds\frac{y}{x}+\ln(\frac{y}{x}) &amp; = &amp; -2\ln x+c\\
\Rightarrow &amp; \ds\frac{y}{x} &amp; = &amp;
-\ln\left(\ds\frac{y}{x}\right)-2\ln x+c\\ &amp; &amp; = &amp; -\ln y+\ln
x-2\ln x+c\\ &amp; &amp; = &amp; -\ln y-\ln x+c\\ &amp; &amp; &amp; c=-\ln k\\
&amp;\ds\frac{y}{x} &amp; = &amp; -\ln(yxk)\end{array}$

$\ \Rightarrow \un{y+x\ln(kxy)=0}$

\item[(iv)]
$x^2\ds\frac{dy}{dx}=xy-y^2$

This is of the form $P(x,y)\ds\frac{dy}{dx}+Q(x,y)=0$

where $\left.\begin{array} {lcl} P(x,y)=x^2 &amp; \Rightarrow
&amp;\rm{degree} 2\\ Q(x,y)=y^2-xy &amp; \Rightarrow &amp; \rm{degree} 2
\end{array} \right\} \Rightarrow \un{\rm{homogenous}}$

Thus rearrange to get

$$\ds\frac{dy}{dx}=\ds\frac{xy-y^2}{x^2}$$

Divide RHS top and bottom by $x^2$

$$\ds\frac{dy}{dx}=\ds\frac{(\frac{xy}{x^2}-\frac{y^2}{x^2})}
{(\frac{x^2}{x^2})}=\ds\frac{(\frac{y}{x})-(\frac{y}{x})^2}{1}$$

Set $y=vx \Rightarrow \ds\frac{dy}{dx}=v+x\frac{dv}{dx}$

Thus $$\begin{array} {crcl} &amp; v+x\ds\frac{dv}{dx} &amp; = &amp; v-v^2\\
\rm{or} &amp; x\ds\frac{dv}{dx} &amp; = &amp; -v^2\end{array}$$

This is variables separable

$\begin{array} {crcl} &amp; \ds\int\ds\frac{dv}{v^2} &amp; = &amp;
-\ds\int\ds\frac{dx}{x}\\ \Rightarrow &amp; -\ds\frac{1}{v} &amp; = &amp; -\ln
x+c\\ \rm{or} &amp; \ds\frac{1}{v} &amp; = &amp; \ln x-c\\&amp; &amp; &amp; \rm{set}\
c=-\ln k\\ \Rightarrow &amp; \ds\frac{y}{x} &amp; = &amp; \ln x-c\\
\Rightarrow &amp; \ds\frac{y}{x} &amp; = &amp; -\ln kx \end{array}$

or \un{$y=x\ln kx$}
\end{description}

\end{document}
</pre></body></html>