Internal
problem
ID
[8861]
Book
:
Own
collection
of
miscellaneous
problems
Section
:
section
3.0
Problem
number
:
3
Date
solved
:
Sunday, March 30, 2025 at 01:44:53 PM
CAS
classification
:
[[_2nd_order, _linear, _nonhomogeneous]]
With initial conditions
ode:=diff(diff(y(x),x),x)+y(x) = sin(x); ic:=y(0) = 1; dsolve([ode,ic],y(x), singsol=all);
ode=D[y[x],{x,2}]+y[x]==Sin[x]; ic={y[0] == 1}; DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
from sympy import * x = symbols("x") y = Function("y") ode = Eq(y(x) - sin(x) + Derivative(y(x), (x, 2)),0) ics = {y(0): 1} dsolve(ode,func=y(x),ics=ics)