Internal
problem
ID
[4162]
Book
:
Theory
and
solutions
of
Ordinary
Differential
equations,
Donald
Greenspan,
1960
Section
:
Chapter
4.
The
general
linear
differential
equation
of
order
n.
Exercises
at
page
63
Problem
number
:
9(b)
Date
solved
:
Sunday, March 30, 2025 at 02:41:19 AM
CAS
classification
:
[[_2nd_order, _linear, _nonhomogeneous]]
With initial conditions
ode:=diff(diff(y(x),x),x)+9*y(x) = 8*sin(x); ic:=y(1/2*Pi) = -1, D(y)(1/2*Pi) = 1; dsolve([ode,ic],y(x), singsol=all);
ode=D[y[x],{x,2}]+9*y[x]==8*Sin[x]; ic={y[Pi/2]==-1,Derivative[1][y][Pi/2] ==1}; DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
from sympy import * x = symbols("x") y = Function("y") ode = Eq(9*y(x) - 8*sin(x) + Derivative(y(x), (x, 2)),0) ics = {y(pi/2): -1, Subs(Derivative(y(x), x), x, pi/2): 1} dsolve(ode,func=y(x),ics=ics)