This is a special case of a nonlinear differential equation that can be solved analytically. To start, let’s algebraically rearrange to get the following form:
y′−x2y=−x2y2⇒y2y′−xy2=−x2 We’ll now use a change of variables of u=y1,u′=y2−y′
y2y′−xy2=−x2⇒−u′−x2u=−x2⇒u′+x2u=x2 This has turned a nonlinear differential equation into a linear differential equation, which we can now solve by the method of integrating factors:
μ=exp(2∫x1dx)=exp(2ln∣x∣dx)=x2 Substituting in our integrating factor, we can find u(x):
u=x21(∫x2⋅x2dx+C)=x21(∫x4dx+C)=x21(5x5+C)=5x3+x2C We can now get y(x) back from u(x):
u=5x3+x2C⇒y1=5x3+x2C⇒y=5x3+x2C1⇒y=x5+C5x2 Upon applying the initial condition, we get:
y=x5+C5x2⇒y(a)=a5+C5a2=b⇒5a2=b(a5+C)=ba5+Cb⇒5a2−ba5=Cb⇒b5a5−a5=C Thus, the explicit solution is:
y=x5+b5a5−a55x2