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

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

2021-02-10
$$(y^2+1)=(ysec^2x)dy/dx$$
$$(y^2+1)=(ysec^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$$
$$=> int y/(-y^2-1) dy= int (-1)/sec^2x dx$$
$$=> -int y/(-y^2-1) dy= -int 1/sec^2x dx$$
$$=> -1/2 ln(-y^2-1)= /1/2(x+1/2sin(2x))+c$$
$$-1/2 ln(0-1)= -1/2(0+1/2sin(0))+c$$ $$[:' y(0)=0]$$
c=0 Substitute $$c=0 in -1/2 ln(-y^2-1)+ -1/2(x+1/2sin(2x))+c$$ and solve for y.
$$-1/2 ln(-y^2-1)= -1/2(x+1/2sin(2x))$$
$$ln(-y^2-1)= x+1/2sin(2x)$$
$$-y^2-1= e^(x+1/2sin(2x))$$
$$-y^2= e^(x+1/2sin(2x))+1$$
$$y^2= e^(x+1/2sin(2x))-1$$
$$y= +- sqrt(e^(x+1/2sin(2x))-1)$$

### Relevant Questions

Solve differential equation $$xy'+2y= -x^3+x, \ y(1)=2$$

Solve differential equation $$\frac{\cos^2y}{4x+2}dy= \frac{(\cos y+\sin y)^2}{\sqrt{x^2+x+3}}dx$$

Solve differential equation $$\displaystyle{y}{\left({2}{x}-{2}+{x}{y}+{1}\right)}{\left.{d}{x}\right.}+{\left({x}-{y}\right)}{\left.{d}{y}\right.}={0}$$
Solve differential equation $$\displaystyle{2}{x}{y}-{9}{x}^{{2}}+{\left({2}{y}+{x}^{{2}}+{1}\right)}{\frac{{{\left.{d}{y}\right.}}}{{{\left.{d}{x}\right.}}}}={0},\ {y}{\left({0}\right)}=-{3}$$
Solve differential equation $$2xy-9x^2+(2y+x^2+1)dy/dx=0$$, y(0)= -3
Solve differential equation $$1+y^2+xy^2)dx+(x^2y+y+2xy)dy=0$$
Solve differential equation $$((3y^2-t^2)/y^5)dy/dx+t/(2y^4)=0$$, y(1)=1
Solve differential equation $$(6x+1)y^2 dy/dx+3x^2+2y^3=0$$, y(0)=1
Solve differential equation $$sin(x) dy/dx+(cos(x))y=0$$, $$y((7pi)/6)=-2$$