Solving the differential equation $y''=\frac{1}{y}$

89 Views Asked by At

I tried to solve the differential equation $\frac{d^2y}{dx^2}=\frac{1}{y}$ by assuming $y(0)=1$ and $y'(0)=0$ and finding a taylor expansion for $y$ at $x=0$. By differentiating $\frac{d^2y}{dx^2}$, I got:

$\frac{d^3y}{dx^3}=-\frac{1}{y^2}\frac{dy}{dx}$

$\frac{d^4y}{dx^4}= \frac{2}{y^3}\frac{dy}{dx} -\frac{1}{y^2}\frac{d^2y}{dx^2}$

$\frac{d^5y}{dx^5}= -\frac{6}{y^4}\frac{dy}{dx} +\frac{4}{y^3}\frac{d^2y}{dx^2} -\frac{1}{y^2}\frac{d^3y}{dx^3}$

$\frac{d^6y}{dx^6}= \frac{24}{y^5}\frac{dy}{dx} -\frac{18}{y^4}\frac{d^2y}{dx^2} +\frac{6}{y^3}\frac{d^3y}{dx^3} -\frac{1}{y^2}\frac{d^4y}{dx^4}$

Evaluating those, I got the following values:
$y^{(3)}(0)=0$
$y^{(4)}(0)=1$
$y^{(5)}(0)=4$
$y^{(6)}(0)=-17$

I then created a Python program to automatically derive more values:
$y^{(7)}(0)=84$
$y^{(8)}(0)=-483$
$y^{(9)}(0)=3192$
$y^{(10)}(0)=-23919$

I used the derivatives to get a Taylor series, and I found that the series does not converge when $x>1$. Did I make a mistake? If not, is there an approach I could use to approximate $y(2)$ or other values where $x>1$?

3

There are 3 best solutions below

0
On BEST ANSWER

Write your equation in the form $$y''y-1=0$$ and multiply by $y'$ then we get $$\frac{1}{2}(y')^2=\log(y(x))+C_1$$ so $$y'=\pm\sqrt{2\log(y(x))+2C_1}$$ and we have to integrate $$\int\frac{y'}{\sqrt{2\log(y(x))+2C_1}}dx=\pm\int 1dx$$ we get $$e^{c_1}\sqrt{\frac{\pi}{2}}\text{erfi}(\sqrt{\log(y(x))+C_1})=C_2\pm x$$

0
On

I don't know how to help you with your current approach, but I do know you can rewrite the equation as a system of two equations and use a Runge-Kutta method to find $y(2)$.

The system would look like this:

$$\begin{cases} x_1'=x_2 \\ x_2'=\frac{1}{x_1} \end{cases}$$

where I used the change of variable $x_1 = y$ and $x_2 = y'$.

1
On

Multiply both sides of $y''= 1/y $ by $ y'$ to get $$y''y' = \frac {y'}{y}$$

Integrate to get $$(y')^2 = 2\ln y $$

which gives us $$y'=\sqrt {2\ln y+K}$$

Separate variables to get $$\int \frac {dy}{\sqrt {2\ln y+K}} =x+C$$