Internal
problem
ID
[15555]
Book
:
DIFFERENTIAL
and
INTEGRAL
CALCULUS.
VOL
I.
by
N.
PISKUNOV.
MIR
PUBLISHERS,
Moscow
1969.
Section
:
Chapter
8.
Differential
equations.
Exercises
page
595
Problem
number
:
163
Date
solved
:
Thursday, October 02, 2025 at 10:19:50 AM
CAS
classification
:
[[_2nd_order, _linear, _nonhomogeneous]]
With initial conditions
ode:=diff(diff(y(x),x),x)+n^2*y(x) = h*sin(r*x); ic:=[y(0) = a, D(y)(0) = c]; dsolve([ode,op(ic)],y(x), singsol=all);
ode=D[y[x],{x,2}]+n^2*y[x]==h*Sin[r*x]; ic={y[0]==a,Derivative[1][y][0] ==c}; DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
from sympy import * x = symbols("x") h = symbols("h") n = symbols("n") r = symbols("r") y = Function("y") ode = Eq(-h*sin(r*x) + n**2*y(x) + Derivative(y(x), (x, 2)),0) ics = {y(0): a, Subs(Derivative(y(x), x), x, 0): c} dsolve(ode,func=y(x),ics=ics)