Group Abstract Group Abstract

Message Boards Message Boards

Analytical solution of a system of linear ODEs

Posted 10 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 10 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

Try:

{x[t], y[t], z[t]} /. 
  FullSimplify[
   dsol = DSolve[
     ode = {
       x''[t] + t x'[t] + x[t] == z[t], 
       y''[t] + y'[t] + y[t] == 0,
       z''[t] + z'[t] + z[t] == 0},
     {x, y, z}, t]];
ode /. dsol // FullSimplify

(*  {{True, True, True}}  *)

If you solved for {x[t], y[t], z[t]} instead of {x, y, z}, you will have to do some extra work to substitute the solution into the derivatives x'[t], y'[t], and z'[t]. You didn't show what you substituted, so I cannot comment definitively.

POSTED BY: Michael Rogers
Posted 10 months ago
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