Internal
problem
ID
[9162]
Book
:
Second
order
enumerated
odes
Section
:
section
2
Problem
number
:
39
Date
solved
:
Sunday, March 30, 2025 at 02:24:27 PM
CAS
classification
:
[_linear]
Time used: 0.057 (sec)
Solve
In canonical form a linear first order is
Comparing the above to the given ode shows that
The integrating factor
The ode becomes
Integrating gives
Dividing throughout by the integrating factor
Summary of solutions found
Time used: 0.125 (sec)
Solve
To solve an ode of the form
We assume there exists a function
Hence
But since
If the above condition is satisfied, then the original ode is called exact. We still need to determine
Therefore
Comparing (1A) and (2A) shows that
The next step is to determine if the ODE is is exact or not. The ODE is exact when the following condition is satisfied
Using result found above gives
And
Since
Since
The result of integrating gives
And
Now a modified ODE is ontained from the original ODE, which is exact and can be solved. The modified ODE is
The following equations are now set up to solve for the function
Integrating (2) w.r.t.
Where
But equation (1) says that
Solving equation (5) for
Integrating the above w.r.t
Where
But since
Solving for
Which simplifies to
Summary of solutions found
ode:=diff(y(x),x)+cot(x)*y(x) = 2*cos(x); dsolve(ode,y(x), singsol=all);
Maple trace
Methods for first order ODEs: --- Trying classification methods --- trying a quadrature trying 1st order linear <- 1st order linear successful
Maple step by step
ode=D[y[x],x]+y[x]*Cot[x]==2*Cos[x]; ic={}; DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
from sympy import * x = symbols("x") y = Function("y") ode = Eq(y(x)/tan(x) - 2*cos(x) + Derivative(y(x), x),0) ics = {} dsolve(ode,func=y(x),ics=ics)