Internal
problem
ID
[20992]
Book
:
A
FIRST
COURSE
IN
DIFFERENTIAL
EQUATIONS
FOR
SCIENTISTS
AND
ENGINEERS.
By
Russell
Herman.
University
of
North
Carolina
Wilmington.
LibreText.
compiled
on
06/09/2025
Section
:
Chapter
2,
Second
order
ODEs.
Problems
section
2.6
Problem
number
:
16.b
Date
solved
:
Thursday, October 02, 2025 at 07:01:11 PM
CAS
classification
:
[[_2nd_order, _linear, _nonhomogeneous]]
With initial conditions
ode:=diff(diff(x(t),t),t)+x(t) = 2*tan(t); ic:=[x(0) = 4, D(x)(0) = 0]; dsolve([ode,op(ic)],x(t), singsol=all);
ode=D[x[t],{t,2}]+x[t]==2*tan(t); ic={x[0]==4,Derivative[1][x][0] ==0}; DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
from sympy import * t = symbols("t") x = Function("x") ode = Eq(x(t) - 2*tan(t) + Derivative(x(t), (t, 2)),0) ics = {x(0): 4, Subs(Derivative(x(t), t), t, 0): 0} dsolve(ode,func=x(t),ics=ics)