Internal
problem
ID
[7639]
Book
:
An
introduction
to
Ordinary
Differential
Equations.
Earl
A.
Coddington.
Dover.
NY
1961
Section
:
Chapter
2.
Linear
equations
with
constant
coefficients.
Page
69
Problem
number
:
4(c)
Date
solved
:
Sunday, March 30, 2025 at 12:17:53 PM
CAS
classification
:
[[_2nd_order, _linear, _nonhomogeneous]]
With initial conditions
ode:=diff(diff(y(x),x),x)+omega^2*y(x) = A*cos(omega*x); ic:=y(0) = 0, D(y)(0) = 1; dsolve([ode,ic],y(x), singsol=all);
ode=D[y[x],{x,2}]+\[Omega]^2*y[x]==A*Cos[\[Omega]*x]; ic={y[0]==0,Derivative[1][y][0] ==1}; DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
from sympy import * x = symbols("x") A = symbols("A") omega = symbols("omega") y = Function("y") ode = Eq(-A*cos(omega*x) + omega**2*y(x) + Derivative(y(x), (x, 2)),0) ics = {y(0): 0, Subs(Derivative(y(x), x), x, 0): 1} dsolve(ode,func=y(x),ics=ics)