75.30.3 problem 812

Internal problem ID [17194]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Chapter 3 (Systems of differential equations). Section 23. Methods of integrating nonhomogeneous linear systems with constant coefficients. Exercises page 234
Problem number : 812
Date solved : Monday, March 31, 2025 at 03:44:18 PM
CAS classification : system_of_ODEs

\begin{align*} \frac {d}{d t}x \left (t \right )&=y \left (t \right )+\tan \left (t \right )^{2}-1\\ \frac {d}{d t}y \left (t \right )&=\tan \left (t \right )-x \left (t \right ) \end{align*}

Maple. Time used: 0.316 (sec). Leaf size: 29
ode:=[diff(x(t),t) = y(t)+tan(t)^2-1, diff(y(t),t) = tan(t)-x(t)]; 
dsolve(ode);
 
\begin{align*} x \left (t \right ) &= \sin \left (t \right ) c_2 +\cos \left (t \right ) c_1 +\tan \left (t \right ) \\ y \left (t \right ) &= \cos \left (t \right ) c_2 -\sin \left (t \right ) c_1 +2 \\ \end{align*}
Mathematica. Time used: 0.013 (sec). Leaf size: 100
ode={D[x[t],t]==y[t]+Tan[t]^2-1,D[y[t],t]==Tan[t]-x[t]}; 
ic={}; 
DSolve[{ode,ic},{x[t],y[t]},t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to \cos (t) \int _1^t-\cos (K[1])dK[1]+\sin (t) \int _1^t\sin (K[2]) \tan ^2(K[2])dK[2]+c_1 \cos (t)+c_2 \sin (t) \\ y(t)\to -\sin (t) \int _1^t-\cos (K[1])dK[1]+\cos (t) \int _1^t\sin (K[2]) \tan ^2(K[2])dK[2]+c_2 \cos (t)-c_1 \sin (t) \\ \end{align*}
Sympy. Time used: 0.160 (sec). Leaf size: 42
from sympy import * 
t = symbols("t") 
x = Function("x") 
y = Function("y") 
ode=[Eq(-y(t) - tan(t)**2 + Derivative(x(t), t) + 1,0),Eq(x(t) - tan(t) + Derivative(y(t), t),0)] 
ics = {} 
dsolve(ode,func=[x(t),y(t)],ics=ics)
 
\[ \left [ x{\left (t \right )} = C_{1} \sin {\left (t \right )} + C_{2} \cos {\left (t \right )} + \frac {\sin {\left (t \right )}}{\cos {\left (t \right )}}, \ y{\left (t \right )} = C_{1} \cos {\left (t \right )} - C_{2} \sin {\left (t \right )} + \sin ^{2}{\left (t \right )} + \cos ^{2}{\left (t \right )} + 1\right ] \]