Internal
problem
ID
[7449]
Book
:
Fundamentals
of
Differential
Equations.
By
Nagle,
Saff
and
Snider.
9th
edition.
Boston.
Pearson
2018.
Section
:
Chapter
2,
First
order
differential
equations.
Section
2.3,
Linear
equations.
Exercises.
page
54
Problem
number
:
21
Date
solved
:
Tuesday, September 30, 2025 at 04:35:41 PM
CAS
classification
:
[_linear]
With initial conditions
ode:=cos(x)*diff(y(x),x)+y(x)*sin(x) = 2*x*cos(x)^2; ic:=[y(1/4*Pi) = -15/32*2^(1/2)*Pi^2]; dsolve([ode,op(ic)],y(x), singsol=all);
ode=Cos[x]*D[y[x],x]+y[x]*Sin[x]==2*x*Cos[x]^2; ic={y[Pi/4]==-15*Sqrt[2]*Pi^2/32}; DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
from sympy import * x = symbols("x") y = Function("y") ode = Eq(-2*x*cos(x)**2 + y(x)*sin(x) + cos(x)*Derivative(y(x), x),0) ics = {y(pi/4): -15*sqrt(2)*pi**2/32} dsolve(ode,func=y(x),ics=ics)