Question

# Solve differential equation(y2+1)dx=ysec^2(x)dy, y(0)=0

First order differential equations

Solve differential equation $$(y2+1)dx=y \sec^2(x)dy$$, $$y(0)=0$$

2021-02-10

$$(y^2+1)=(y \sec^2x)dy/dx$$
$$(y^2+1)=(y \sec^2x)y'$$
$$y/(-y^2-1)y'= (-1)/\sec^2x$$
From the above, it is observed that the first order differential is in the form of $$N(x)y'=M(x)$$, where $$N(x)= y/(-y^2-1)$$ and $$M(x) = (-1)/\sec^2x$$
Integrate on both sides of $$y/(-y^2-1)dy= (-1)/\sec^2x dx$$
$$\Rightarrow \int y/(-y^2-1) dy= \int (-1)/\sec^2x dx$$
$$\Rightarrow -\int y/(-y^2-1) dy= -\int 1/\sec^2x dx$$
$$\Rightarrow -1/2 \ln(-y^2-1)= /1/2(x+1/2\sin(2x))+c$$
$$-1/2 \ln(0-1)= -1/2(0+1/2\sin(0))+c$$ $$[:' y(0)=0]$$
$$c=0$$ Substitute $$c=0 \in -1/2 \ln(-y^2-1)\pm1/2(x+1/2\sin(2x))+c$$ and solve for y.
$$-1/2 \ln(-y^2-1)= -1/2(x+1/2\sin(2x))$$
$$\ln(-y^2-1)= x+1/2\sin(2x)$$
$$-y^2-1= e^{x+1/2\sin(2x)}$$
$$-y^2= e^{x+1/2\sin(2x)}+1$$
$$y^2= e^{x+1/2\sin(2x)}-1$$
$$y= \pm \sqrt{e^{x+1/2\sin(2x)}-1}$$