4

I found this problem on a past exam from my ODE course.

Solve the ODE $$(x^2y - 1)dy - (xy^2-1)dx=0$$

First off, I rearranged to get a form that resembles an exact ODE:

$$(1-xy^2)dx + (x^2y -1)dy = 0$$

But since, $P'_y=-2xy \neq 2xy = Q'_x$, the ODE isn't exact. So I thought the integrating factor method for exact ODEs might be the right approach here. I tried finding and/or guessing the integrating factor in various ways but none of them worked.

I also tried rearranging the equation to get a $\frac{dy}{dx}=\frac{xy^2-1}{x^2y-1}$ form or see if something else will pop up, but that also seemingly led nowhere.

Does anyone have a clue how to solve this? Thanks.

powerline
  • 1,138
  • 2
    It looks like $y(x)$ and its inverse function fulfill the same differential equation, so a rotation of the coordinate system by $45^\circ$ might be useful. – Jack D'Aurizio Aug 23 '25 at 23:45
  • 1
    Maple solves as Abel 2nd type and gives \begin{align}\frac{7 \ln \left(-\frac{63 \left(x^{3}-3 x^{2} y+2\right)}{5 \left(x^{2} y-1\right)}\right)}{18}+\frac{7 \ln \left(-\frac{63 \left(x^{3}-1\right)}{4 \left(x^{2} y-1\right)}\right)}{9}-\frac{7 \ln \left(-\frac{63 x^{2} \left(x -y\right)}{x^{2} y-1}\right)}{6}+\frac{7 \ln \left(x \right)}{3}-\frac{7 \ln \left(x^{2}+x +1\right)}{9}-\frac{7 \ln \left(x -1\right)}{9}-\textit{_C1} = 0 \end{align} – Nasser Aug 24 '25 at 00:39
  • @Nasser: indeed by simplifying those $7$s and $9$s we get a fairly complex, but explicit, polynomial relation involving the variables $x$ and $y$. Cardano's formula finishes the job. – Jack D'Aurizio Aug 24 '25 at 00:52

2 Answers2

4

Ok, a rotation works. If we let $y=u+v$ and $x=u-v$ the ODE turns into

$$ (u^2-v^2)\left(u-v\frac{du}{dv}\right) = 1 \tag{1}$$

which is analogous to

$$ z f'(z) = f(z) + \frac{1}{z^2-f(z)^2}.\tag{2} $$

Let $f(z)=z g(z)$. Then $f'(z)=g(z)+z g'(z)$, so $(2)$ turns into

$$z g(z) + z^2 g'(z) = z g(z) + \frac{1}{z^2-z^2 g(z)^2}\tag{3a} $$

$$ z^4 g'(z) = \frac{1}{1- g(z)^2}\tag{3b} $$

and finally

$$ g'(z)(1-g(z)^2) = \frac{1}{z^4}\tag{4} $$

is a separable ODE.

The explicit solutions involve roots of a cubic polynomial. One of them (provided by Mathematica) is

$$ \frac{\sqrt[3]{-(1-6 c_1){}^2 x^3+\sqrt{(-1+6 c_1){}^3 \left(2 x^3+6 c_1 \left(x^3-1\right)^2-1\right)}+1+12 c_1 (-1+3 c_1)}}{-1+6 c_1}-\frac{x^2}{\sqrt[3]{-(1-6 c_1){}^2 x^3+\sqrt{(-1+6 c_1){}^3 \left(2 x^3+6 c_1 \left(x^3-1\right)^2-1\right)}+1+12 c_1 (-1+3 c_1)}}+x$$

The solution with $y(0)=1$ has the following behaviour near the origin:

unsual behaviour

and it is almost indistinguishable from a line through the origin for large values of $|x|$.

Jack D'Aurizio
  • 372,937
  • 42
  • 421
  • 888
  • thanks! how did you guess a rotation might be useful? is it because of the symmetry in the RHS of $dy/dx = \frac{xy^2-1}{x^2y-1}$? – powerline Aug 24 '25 at 00:34
  • @powerline: no, because I attempted to write the differential equation fulfilled by the inverse function and I got the same ODE, revealing a hidden symmetry. – Jack D'Aurizio Aug 24 '25 at 00:35
  • could you please explain how you do that, it seems like a neat trick, but I'm not following – powerline Aug 24 '25 at 00:40
  • 1
    @powerline: assume that $y$ is (locally) invertible with inverse function $h$. Then $y(h(z))=z$ and $h'(z)y'(h(z))=1$ give $y'(h(z))=\frac{1}{h(z)}$. Now perform the sub $x\to h(z)$ into the original ODE and contemplate the magic as I did :) – Jack D'Aurizio Aug 24 '25 at 00:45
  • 1
    This gives that, if an invertible $y(x)$ is a solution, also its inverse function $h(x)$ is a solution. The graphs of these functions are symmetric with respect to the line $y=x$, so it makes sense to rotate the coordinate system by making the $y=x$ line the $u$-axis. – Jack D'Aurizio Aug 24 '25 at 00:48
  • I actually applied a rotation and a dilation since I was too lazy to carry $2^{\pm 1/2}$ factors throughout the following computations, but the origin of the idea is the one I outlined. – Jack D'Aurizio Aug 24 '25 at 00:49
  • 1
    nice!! many thanks again!! – powerline Aug 24 '25 at 00:55
2

Inspired by Jack D'Aurizio's suggestion of a $45^{\circ}$ rotation of the coordinate system, let's try an integrating factor of the form $\mu(x,y)=f(x-y)$: $$ \frac{\partial}{\partial y}\left[f(x-y)(1-xy^2)\right] =\frac{\partial}{\partial x}\left[f(x-y)(x^2y-1)\right] $$ $$ \implies -f'(x-y)(1-xy^2)-2xyf(x-y)=f'(x-y)(x^2y-1)+2xyf(x-y) $$ $$ \implies f'(x-y)(xy^2-x^2y)=4xyf(x-y) $$ $$ \implies -\xi f'(\xi)=4f(\xi), \tag{1} $$ where $\xi:=x-y$. Integrating $(1)$ we get $$ f(\xi)=\frac{C}{\xi^4}. \tag{2} $$ Therefore, $\mu(x,y)=\frac{1}{(x-y)^4}$ is an integrating factor of the given ODE, i.e., $$ \frac{1-xy^2}{(x-y)^4}\,dx+\frac{x^2y-1}{(x-y)^4}\,dy=0 \tag{3} $$ is exact. Solving it is straighforward, and the final result, in implicit form, is $$ \frac{y^3-3xy^2+2}{(x-y)^3}=C. \tag{4} $$

Gonçalo
  • 17,001