Differential Equations Solving for y

61 Views Asked by At

I was wondering whether anyone could help me with a question which I am currently stuck on? It is asking for the general solution for the expression.

$$\frac {dy}{dx}=\frac 1 {y-3}$$ $$y > 3 ,y(2)=5$$

I have Reciprocated both sides, establishing that $$x = \int (y-3)dy$$ but then it forms a quadratic and I cant seem to find the expression for y. It is probaby really easy I just cant seem to do it, thanks for your help!

2

There are 2 best solutions below

1
On

$$\frac {dy}{dx}=\frac 1 {y-3}$$ The differential equation is separable $$\int y-3 dy= \int dx$$ $$\frac {y^2}2-3y=x+K$$ $${y^2}-6y=2x+K$$ Complete the square $${y^2}-6y+\color{red}{9}=2x+K+\color{red}{9}$$ $$(y-3)^2=2x+C$$ $$y(2)=5 \implies 2^2=4+C \implies C=0$$ Therefore $$(y-3)^2=2x$$ $$y(x)=3+ \sqrt {2x}$$

0
On

Just a bit different approach: $$\frac{\mathrm{d}y}{\mathrm{d}x}=\frac{1}{y-3}$$ Let $u=y-3$, then we have that $$\frac{\mathrm{d}u}{\mathrm{d}x}=\frac{\mathrm{d}y}{\mathrm{d}x}$$ So $$\frac{\mathrm{d}u}{\mathrm{d}x}=\frac{1}{u}$$ $$u\frac{\mathrm{d}u}{\mathrm{d}x}=1$$ $$2u\frac{\mathrm{d}u}{\mathrm{d}x}=2$$ $$\frac{\mathrm{d}u^2}{\mathrm{d}x}=2$$ $$u^2=2x+C$$ And if we use the initial conditions now: $$y(2)=u(2)+3=5$$ $$u(2)=2$$ So $$4=4+C$$ $$C=0$$ Back to the equation: $$u^2=2x$$ $$u=\sqrt{2x}$$ $$y-3=\sqrt{2x}$$ $$y(x)=\sqrt{2x}+3$$