Group Abstract Group Abstract

Message Boards Message Boards

Analytical solution of a system of linear ODEs

Posted 4 months ago

How to solve a system of differential equations

x''[t] + t  x'[t] + x[t] = z[t],   y''[t] + y'[t] + y[t] = 0

and z''[t] + z'[t] +z[t] = 0 analytically using Mathematica?

6 Replies
Posted 4 months ago
{x[t],y[t],z[t]}/.FullSimplify[DSolve[
  {x''[t]+t x'[t]+x[t]==z[t],y''[t]+y'[t]+y[t]==0,z''[t]+z'[t]+z[t]==0},
  {x[t],y[t],z[t]},t]]
POSTED BY: Bill Nelson
POSTED BY: Michael Rogers
Posted 4 months ago
In[1]:= $VersionNumber

Out[1]= 14.1

In[2]:= {x[t],y[t],z[t]}/.FullSimplify[DSolve[
  {x''[t]+t x'[t]+x[t]==z[t],y''[t]+y'[t]+y[t]==0,z''[t]+z'[t]+z[t]==0},
  {x[t],y[t],z[t]},t]]

Out[2]= {{(6*C[2] + Sqrt[2*Pi]*(E^(1/4 - (I/4)*Sqrt[3])*(Sqrt[3]*E^((I/2)*
  Sqrt[3])*C[4]*Erf[(I + Sqrt[3] - (2*I)*t)/(2*Sqrt[2])] - (3*I)*C[3]*Erf[(-I +
  Sqrt[3] + (2*I)*t)/(2*Sqrt[2])]) + 3*C[1]*Erfi[t/Sqrt[2]]))/(6*E^(t^2/2)),
  (C[6]*Cos[(Sqrt[3]*t)/2] + C[5]*Sin[(Sqrt[3]*t)/2])/E^(t/2), 
  ((-3 - (3*I)*Sqrt[3])*C[3] + (3 + I*Sqrt[3])*E^(I*Sqrt[3]*t)*C[4])/(6*E^(((1 +
  I*Sqrt[3])*t)/2))}}

with no warning or error messages.

But, unless I have made a mistake, substituting the solution into the original three equations does not result in {True,True,True}

POSTED BY: Bill Nelson

I used V14.1. IIRC, early versions of DSolve[] did not handle nonautonomous linear systems. Now it does, or at least some of them. DSolve[] has been enhanced with every subversion release, I believe.

POSTED BY: Michael Rogers

It does not work using Mathematica 10.0. Will it work if I use Mathematica 14.1?

It does not work.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard