2.1.14 Problem 14

Solved using first_order_ode_separable
Solved using first_order_ode_exact
Maple
Mathematica
Sympy

Internal problem ID [8726]
Book : Own collection of miscellaneous problems
Section : section 1.0
Problem number : 14
Date solved : Sunday, March 30, 2025 at 01:25:07 PM
CAS classification : [_separable]

Solved using first_order_ode_separable

Time used: 0.252 (sec)

Solve

y=ln(y2+1)ln(x2+1)

The ode

(1)y=ln(y2+1)ln(x2+1)

is separable as it can be written as

y=ln(y2+1)ln(x2+1)=f(x)g(y)

Where

f(x)=1ln(x2+1)g(y)=ln(y2+1)

Integrating gives

1g(y)dy=f(x)dx1ln(y2+1)dy=1ln(x2+1)dx
y1ln(τ2+1)dτ=1ln(x2+1)dx+2c1

We now need to find the singular solutions, these are found by finding for what values g(y) is zero, since we had to divide by this above. Solving g(y)=0 or

ln(y2+1)=0

for y gives

y=0

Now we go over each such singular solution and check if it verifies the ode itself and any initial conditions given. If it does not then the singular solution will not be used.

Therefore the solutions found are

y1ln(τ2+1)dτ=1ln(x2+1)dx+2c1y=0
Figure 2.34: Slope field y=ln(y2+1)ln(x2+1)

Summary of solutions found

y1ln(τ2+1)dτ=1ln(x2+1)dx+2c1y=0
Solved using first_order_ode_exact

Time used: 0.115 (sec)

Solve

y=ln(y2+1)ln(x2+1)

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=(ln(y2+1)ln(x2+1))dx(2A)(ln(y2+1)ln(x2+1))dx+dy=0

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

M(x,y)=ln(y2+1)ln(x2+1)N(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(ln(y2+1)ln(x2+1))=2y(y2+1)ln(x2+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((2y(y2+1)ln(x2+1))(0))=2y(y2+1)ln(x2+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)=ln(x2+1)ln(y2+1)((0)(2y(y2+1)ln(x2+1)))=2yln(y2+1)(y2+1)

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

μ=eBdy=e2yln(y2+1)(y2+1)dy

The result of integrating gives

μ=eln(ln(y2+1))=1ln(y2+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=1ln(y2+1)(ln(y2+1)ln(x2+1))=1ln(x2+1)

And

N=μN=1ln(y2+1)(1)=1ln(y2+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(1ln(x2+1))+(1ln(y2+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=1ln(x2+1)dx(3)ϕ=1ln(x2+1)dx+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=0+f(y)

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

(5)1ln(y2+1)=0+f(y)

Solving equation (5) for f(y) gives

f(y)=1ln(y2+1)

Integrating the above w.r.t y gives

f(y)dy=(1ln(y2+1))dyf(y)=y1ln(τ2+1)dτ+c2

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

ϕ=1ln(x2+1)dx+y1ln(τ2+1)dτ+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=1ln(x2+1)dx+y1ln(τ2+1)dτ
Figure 2.35: Slope field y=ln(y2+1)ln(x2+1)

Summary of solutions found

1ln(x2+1)dx+y1ln(τ2+1)dτ=c2
Maple. Time used: 0.004 (sec). Leaf size: 30
ode:=diff(y(x),x) = ln(1+y(x)^2)/ln(x^2+1); 
dsolve(ode,y(x), singsol=all);
 
1ln(x2+1)dxy1ln(_a2+1)d_a+c1=0

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)=ln(y(x)2+1)ln(x2+1)Highest derivative means the order of the ODE is1ddxy(x)Solve for the highest derivativeddxy(x)=ln(y(x)2+1)ln(x2+1)Separate variablesddxy(x)ln(y(x)2+1)=1ln(x2+1)Integrate both sides with respect toxddxy(x)ln(y(x)2+1)dx=1ln(x2+1)dx+C1Cannot compute integralddxy(x)ln(y(x)2+1)dx=1ln(x2+1)dx+C1
Mathematica. Time used: 0.688 (sec). Leaf size: 48
ode=D[y[x],x] == Log[1+y[x]^2]/Log[1+x^2]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
y(x)InverseFunction[1#11log(K[1]2+1)dK[1]&][1x1log(K[2]2+1)dK[2]+c1]y(x)0
Sympy. Time used: 0.666 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - log(y(x)**2 + 1)/log(x**2 + 1),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
y(x)1log(y2+1)dy=C1+1log(x2+1)dx