Internal
problem
ID
[17587]
Book
:
Differential
equations.
An
introduction
to
modern
methods
and
applications.
James
Brannan,
William
E.
Boyce.
Third
edition.
Wiley
2015
Section
:
Chapter
4.
Second
order
linear
equations.
Section
4.5
(Nonhomogeneous
Equations,
Method
of
Undetermined
Coefficients).
Problems
at
page
260
Problem
number
:
18
Date
solved
:
Monday, March 31, 2025 at 04:18:23 PM
CAS
classification
:
[[_2nd_order, _linear, _nonhomogeneous]]
With initial conditions
ode:=diff(diff(y(t),t),t)+4*y(t) = t^2+3*exp(t); ic:=y(0) = 0, D(y)(0) = 2; dsolve([ode,ic],y(t), singsol=all);
ode=D[y[t],{t,2}]+4*y[t]==t^2+3*Exp[t]; ic={y[0]==0,Derivative[1][y][0] ==2}; DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
from sympy import * t = symbols("t") y = Function("y") ode = Eq(-t**2 + 4*y(t) - 3*exp(t) + Derivative(y(t), (t, 2)),0) ics = {y(0): 0, Subs(Derivative(y(t), t), t, 0): 2} dsolve(ode,func=y(t),ics=ics)