2.1.84 Problem 83

Solved using first_order_ode_autonomous
Solved using first_order_ode_exact
Solved using first_order_ode_dAlembert
Maple
Mathematica
Sympy

Internal problem ID [8796]
Book : Own collection of miscellaneous problems
Section : section 1.0
Problem number : 83
Date solved : Sunday, March 30, 2025 at 01:36:49 PM
CAS classification : [_quadrature]

Solved using first_order_ode_autonomous

Time used: 0.113 (sec)

Solve

y=1y2

Integrating gives

1y2+1dy=dxarcsin(y)=x+c1

Singular solutions are found by solving

y2+1=0

for y. This is because we had to divide by this in the above step. This gives the following singular solution(s), which also have to satisfy the given ODE.

y=1y=1

The following diagram is the phase line diagram. It classifies each of the above equilibrium points as stable or not stable or semi-stable.

Solving for y gives

y=1y=1y=sin(x+c1)
Figure 2.151: Slope field y=1y2

Summary of solutions found

y=1y=1y=sin(x+c1)
Solved using first_order_ode_exact

Time used: 0.156 (sec)

Solve

y=1y2

To solve an ode of the form

(A)M(x,y)+N(x,y)dydx=0

We assume there exists a function ϕ(x,y)=c where c is constant, that satisfies the ode. Taking derivative of ϕ w.r.t. x gives

ddxϕ(x,y)=0

Hence

(B)ϕx+ϕydydx=0

Comparing (A,B) shows that

ϕx=Mϕy=N

But since 2ϕxy=2ϕyx then for the above to be valid, we require that

My=Nx

If the above condition is satisfied, then the original ode is called exact. We still need to determine ϕ(x,y) but at least we know now that we can do that since the condition 2ϕxy=2ϕyx is satisfied. If this condition is not satisfied then this method will not work and we have to now look for an integrating factor to force this condition, which might or might not exist. The first step is to write the ODE in standard form to check for exactness, which is

(1A)M(x,y)dx+N(x,y)dy=0

Therefore

dy=(y2+1)dx(2A)(y2+1)dx+dy=0

Comparing (1A) and (2A) shows that

M(x,y)=y2+1N(x,y)=1

The next step is to determine if the ODE is is exact or not. The ODE is exact when the following condition is satisfied

My=Nx

Using result found above gives

My=y(y2+1)=yy2+1

And

Nx=x(1)=0

Since MyNx, then the ODE is not exact. Since the ODE is not exact, we will try to find an integrating factor to make it exact. Let

A=1N(MyNx)=1((yy2+1)(0))=yy2+1

Since A depends on y, it can not be used to obtain an integrating factor. We will now try a second method to find an integrating factor. Let

B=1M(NxMy)=1y2+1((0)(yy2+1))=yy21

Since B does not depend on x, it can be used to obtain an integrating factor. Let the integrating factor be μ. Then

μ=eBdy=eyy21dy

The result of integrating gives

μ=eln(y1)2ln(y+1)2=1y1y+1

M and N are now multiplied by this integrating factor, giving new M and new N which are called M and N so not to confuse them with the original M and N.

M=μM=1y1y+1(y2+1)=y2+1y1y+1

And

N=μN=1y1y+1(1)=1y1y+1

So now a modified ODE is obtained from the original ODE which will be exact and can be solved using the standard method. The modified ODE is

M+Ndydx=0(y2+1y1y+1)+(1y1y+1)dydx=0

The following equations are now set up to solve for the function ϕ(x,y)

(1)ϕx=M(2)ϕy=N

Integrating (1) w.r.t. x gives

ϕxdx=Mdxϕxdx=y2+1y1y+1dx(3)ϕ=y2+1xy1y+1+f(y)

Where f(y) is used for the constant of integration since ϕ is a function of both x and y. Taking derivative of equation (3) w.r.t y gives

(4)ϕy=xyy2+1y1y+1+y2+1x2(y1)3/2y+1+y2+1x2y1(y+1)3/2+f(y)=0+f(y)

But equation (2) says that ϕy=1y1y+1. Therefore equation (4) becomes

(5)1y1y+1=0+f(y)

Solving equation (5) for f(y) gives

f(y)=1y1y+1

Integrating the above w.r.t y gives

f(y)dy=(1y1y+1)dyf(y)=(y1)(y+1)ln(y+y21)y1y+1+c2

Where c2 is constant of integration. Substituting result found above for f(y) into equation (3) gives ϕ

ϕ=y2+1xy1y+1+(y1)(y+1)ln(y+y21)y1y+1+c2

But since ϕ itself is a constant function, then let ϕ=c3 where c2 is new constant and combining c2 and c3 constants into the constant c2 gives the solution as

c2=y2+1xy1y+1+(y1)(y+1)ln(y+y21)y1y+1

Which simplifies to

1+y2ln(y+1+y2)1y2xy1y+1=c2
Figure 2.152: Slope field y=1y2

Summary of solutions found

1+y2ln(y+1+y2)1y2xy1y+1=c2
Solved using first_order_ode_dAlembert

Time used: 0.167 (sec)

Solve

y=1y2

Let p=y the ode becomes

p=y2+1

Solving for y from the above results in

(1)y=p2+1(2)y=p2+1

This has the form

(*)y=xf(p)+g(p)

Where f,g are functions of p=y(x). Each of the above ode’s is dAlembert ode which is now solved.

Solving ode 1A

Taking derivative of (*) w.r.t. x gives

p=f+(xf+g)dpdx(2)pf=(xf+g)dpdx

Comparing the form y=xf+g to (1A) shows that

f=0g=p2+1

Hence (2) becomes

(2A)p=pp(x)p2+1

The singular solution is found by setting dpdx=0 in the above which gives

p=0

Solving the above for p results in

p1=0

Substituting these in (1A) and keeping singular solution that verifies the ode gives

y=1

The general solution is found when dpdx0. From eq. (2A). This results in

(3)p(x)=p(x)2+1

This ODE is now solved for p(x). No inversion is needed.

Integrating gives

1p2+1dp=dxarcsin(p)=x+c4

Singular solutions are found by solving

p2+1=0

for p(x). This is because we had to divide by this in the above step. This gives the following singular solution(s), which also have to satisfy the given ODE.

p(x)=1p(x)=1

Substituing the above solution for p in (2A) gives

y=sin(x+c4)2+1y=0y=0

Solving ode 2A

Taking derivative of (*) w.r.t. x gives

p=f+(xf+g)dpdx(2)pf=(xf+g)dpdx

Comparing the form y=xf+g to (1A) shows that

f=0g=p2+1

Hence (2) becomes

(2A)p=pp(x)p2+1

The singular solution is found by setting dpdx=0 in the above which gives

p=0

Solving the above for p results in

p1=0

Substituting these in (1A) and keeping singular solution that verifies the ode gives

y=1

The general solution is found when dpdx0. From eq. (2A). This results in

(3)p(x)=p(x)2+1

This ODE is now solved for p(x). No inversion is needed.

Integrating gives

1p2+1dp=dxarcsin(p)=x+c5

Singular solutions are found by solving

p2+1=0

for p(x). This is because we had to divide by this in the above step. This gives the following singular solution(s), which also have to satisfy the given ODE.

p(x)=1p(x)=1

Substituing the above solution for p in (2A) gives

y=sin(x+c5)2+1y=0y=0

The solution

y=0

was found not to satisfy the ode or the IC. Hence it is removed. The solution

y=sin(x+c4)2+1

was found not to satisfy the ode or the IC. Hence it is removed. The solution

y=sin(x+c5)2+1

was found not to satisfy the ode or the IC. Hence it is removed.

Figure 2.153: Slope field y=1y2

Summary of solutions found

y=1y=1
Maple. Time used: 0.004 (sec). Leaf size: 8
ode:=diff(y(x),x) = (1-y(x)^2)^(1/2); 
dsolve(ode,y(x), singsol=all);
 
y=sin(x+c1)

Maple trace

Methods for first order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying 1st order linear 
trying Bernoulli 
trying separable 
<- separable successful
 

Maple step by step

Let’s solveddxy(x)=1y(x)2Highest derivative means the order of the ODE is1ddxy(x)Solve for the highest derivativeddxy(x)=1y(x)2Separate variablesddxy(x)1y(x)2=1Integrate both sides with respect toxddxy(x)1y(x)2dx=1dx+C1Evaluate integralarcsin(y(x))=x+C1Solve fory(x)y(x)=sin(x+C1)
Mathematica. Time used: 0.159 (sec). Leaf size: 28
ode=D[y[x],x]==Sqrt[1-y[x]^2]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
y(x)sin(x+c1)y(x)1y(x)1y(x)Interval[{1,1}]
Sympy. Time used: 0.222 (sec). Leaf size: 7
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-sqrt(1 - y(x)**2) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
y(x)=sin(C1+x)