2.1.20 Problem 20

Solved using first_order_ode_bernoulli
Maple
Mathematica
Sympy

Internal problem ID [8732]
Book : Own collection of miscellaneous problems
Section : section 1.0
Problem number : 20
Date solved : Sunday, March 30, 2025 at 01:28:24 PM
CAS classification : [_Bernoulli]

Solved using first_order_ode_bernoulli

Time used: 0.187 (sec)

Solve

y+y3=(12x)y43

In canonical form, the ODE is

y=F(x,y)=13y23y4x+13y4

This is a Bernoulli ODE.

(1)y=(13)y+(2x3+13)y4

The standard Bernoulli ODE has the form

(2)y=f0(x)y+f1(x)yn

Comparing this to (1) shows that

f0=13f1=2x3+13

The first step is to divide the above equation by yn which gives

(3)yyn=f0(x)y1n+f1(x)

The next step is use the substitution v=y1n in equation (3) which generates a new ODE in v(x) which will be linear and can be easily solved using an integrating factor. Backsubstitution then gives the solution y(x) which is what we want.

This method is now applied to the ODE at hand. Comparing the ODE (1) With (2) Shows that

f0(x)=13f1(x)=2x3+13n=4

Dividing both sides of ODE (1) by yn=y4 gives

(4)y1y4=13y32x3+13

Let

v=y1n(5)=1y3

Taking derivative of equation (5) w.r.t x gives

(6)v=3y4y

Substituting equations (5) and (6) into equation (4) gives

v(x)3=v(x)32x3+13(7)v=v+2x1

The above now is a linear ODE in v(x) which is now solved.

In canonical form a linear first order is

v(x)+q(x)v(x)=p(x)

Comparing the above to the given ode shows that

q(x)=1p(x)=2x1

The integrating factor μ is

μ=eqdx=e(1)dx=ex

The ode becomes

ddx(μv)=μpddx(μv)=(μ)(2x1)ddx(vex)=(ex)(2x1)d(vex)=((2x1)ex)dx

Integrating gives

vex=(2x1)exdx=(2x1)ex+c1

Dividing throughout by the integrating factor ex gives the final solution

v(x)=exc12x1

The substitution v=y1n is now used to convert the above solution back to y which results in

1y3=exc12x1

Solving for y gives

y=1(exc12x1)1/3y=12(exc12x1)1/3i32(exc12x1)1/3y=12(exc12x1)1/3+i32(exc12x1)1/3

Which simplifies to

y=1(exc12x1)1/3y=1+i32(exc12x1)1/3y=1+i32(exc12x1)1/3
Figure 2.44: Slope field y+y3=(12x)y43

Summary of solutions found

y=1(exc12x1)1/3y=1+i32(exc12x1)1/3y=1+i32(exc12x1)1/3
Maple. Time used: 0.003 (sec). Leaf size: 61
ode:=diff(y(x),x)+1/3*y(x) = 1/3*(-2*x+1)*y(x)^4; 
dsolve(ode,y(x), singsol=all);
 
y=1(exc12x1)1/3y=1+i32(exc12x1)1/3y=i312(exc12x1)1/3

Maple trace

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

Maple step by step

Let’s solveddxy(x)+y(x)3=(12x)y(x)43Highest derivative means the order of the ODE is1ddxy(x)Solve for the highest derivativeddxy(x)=y(x)3+(12x)y(x)43
Mathematica. Time used: 5.413 (sec). Leaf size: 76
ode=D[y[x],x]+y[x]/3== (1-2*x)/3*y[x]^4; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
y(x)12x+c1ex13y(x)132x+c1ex13y(x)(1)2/32x+c1ex13y(x)0
Sympy. Time used: 2.458 (sec). Leaf size: 78
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((2*x - 1)*y(x)**4/3 + y(x)/3 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
[y(x)=1C1ex+2x+13, y(x)=1C1ex+2x+13(13i)2, y(x)=1C1ex+2x+13(1+3i)2]