Internal
problem
ID
[22811]
Book
:
Applied
Differential
Equations.
By
Murray
R.
Spiegel.
3rd
edition.
1980.
Pearson.
ISBN
978-0130400970
Section
:
Chapter
4.
Linear
differential
equations.
A
Exercises
at
page
194
Problem
number
:
2
Date
solved
:
Thursday, October 02, 2025 at 09:14:50 PM
CAS
classification
:
[[_2nd_order, _linear, _nonhomogeneous]]
With initial conditions
ode:=L*diff(diff(q(t),t),t)+R*diff(q(t),t)+1/c*q(t) = E__0*sin(omega*t); ic:=[q(0) = 0, D(q)(0) = 0]; dsolve([ode,op(ic)],q(t), singsol=all);
ode=L*D[q[t],{t,2}]+R*D[q[t],t]+1/c*q[t]==e0*Sin[\[Omega]*t]; ic={q[0]==0,Derivative[1][q][0] ==0}; DSolve[{ode,ic},q[t],t,IncludeSingularSolutions->True]
from sympy import * t = symbols("t") L = symbols("L") R = symbols("R") c = symbols("c") e0 = symbols("e0") q = Function("q") ode = Eq(L*Derivative(q(t), (t, 2)) + R*Derivative(q(t), t) - e0*sin(t*w) + q(t)/c,0) ics = {q(0): 0, Subs(Derivative(q(t), t), t, 0): 0} dsolve(ode,func=q(t),ics=ics)