Skip to main content
added 51 characters in body
Source Link

So I have very little experience in Mathematica but would like to learn how to plot. I have seen a few threads on this for $2\times 2$ systems but not for $3\times 3$.

So I'm trying to plot the phase portrait of the solution to the following equation:

$$\begin{bmatrix}x_1\\x_2\\x_3\end{bmatrix}'=\begin{pmatrix}-2&1&0\\1&-2&1\\0&1&-2\end{pmatrix}\begin{bmatrix}x_1\\x_2\\x_3\end{bmatrix}$$

To make matters easier, I found a general solution:

$$\begin{bmatrix}x_1\\x_2\\x_3\end{bmatrix}=c_1e^{2t}\begin{bmatrix}1\\0\\-1\end{bmatrix}+c_2e^{(2-\sqrt2)t}\begin{bmatrix}1\\-\sqrt2\\1\end{bmatrix}+c_3e^{(2+\sqrt 2)t}\begin{bmatrix}1\\\sqrt2\\1\end{bmatrix}$$

I considered $c_1=c_2=c_3=1$ and tried to plot a solution using the following with ParametricPlot3D:

    ParametricPlot3D[{ E^(-2 u) + E^(-2 u + u Sqrt[2]) +
   E^(-2 u - u Sqrt[2]), 
  Sqrt[2] E^(-2 u + u Sqrt[2]) - 
   Sqrt[2] E^(-2 u - u Sqrt[2]), -E^(-2 u) +
    E^(-2 u + u Sqrt[2]) +- 
   E^(-2 u - u Sqrt[2])}, {u, -1, 10}], PlotTheme -> "Marketing"]

However I only get a diagonal blue line as my solution. Is this a valid approach to plotting anice solution curve? If so, how can I make it plot correctly? If not based on a single initial condition, what should I consider trying (keeping in mind my ability in Mathematicabut is limited)there a nice way to plot many general solutions together?

So I have very little experience in Mathematica but would like to learn how to plot. I have seen a few threads on this for $2\times 2$ systems but not for $3\times 3$.

So I'm trying to plot the phase portrait of the solution to the following equation:

$$\begin{bmatrix}x_1\\x_2\\x_3\end{bmatrix}'=\begin{pmatrix}-2&1&0\\1&-2&1\\0&1&-2\end{pmatrix}\begin{bmatrix}x_1\\x_2\\x_3\end{bmatrix}$$

To make matters easier, I found a general solution:

$$\begin{bmatrix}x_1\\x_2\\x_3\end{bmatrix}=c_1e^{2t}\begin{bmatrix}1\\0\\-1\end{bmatrix}+c_2e^{(2-\sqrt2)t}\begin{bmatrix}1\\-\sqrt2\\1\end{bmatrix}+c_3e^{(2+\sqrt 2)t}\begin{bmatrix}1\\\sqrt2\\1\end{bmatrix}$$

I considered $c_1=c_2=c_3=1$ and tried to plot a solution using the following with ParametricPlot3D:

    ParametricPlot3D[{E^(-2 u) + E^(-2 u + Sqrt[2]) + E^(-2 u - Sqrt[2]), 
  Sqrt[2] E^(-2 u + Sqrt[2]) - Sqrt[2] E^(-2 u - Sqrt[2]), -E^(-2 u) +
    E^(-2 u + Sqrt[2]) + E^(-2 u - Sqrt[2])}, {u, -1, 10}]

However I only get a diagonal blue line as my solution. Is this a valid approach to plotting a solution curve? If so, how can I make it plot correctly? If not, what should I consider trying (keeping in mind my ability in Mathematica is limited)?

So I have very little experience in Mathematica but would like to learn how to plot. I have seen a few threads on this for $2\times 2$ systems but not for $3\times 3$.

So I'm trying to plot the phase portrait of the solution to the following equation:

$$\begin{bmatrix}x_1\\x_2\\x_3\end{bmatrix}'=\begin{pmatrix}-2&1&0\\1&-2&1\\0&1&-2\end{pmatrix}\begin{bmatrix}x_1\\x_2\\x_3\end{bmatrix}$$

To make matters easier, I found a general solution:

$$\begin{bmatrix}x_1\\x_2\\x_3\end{bmatrix}=c_1e^{2t}\begin{bmatrix}1\\0\\-1\end{bmatrix}+c_2e^{(2-\sqrt2)t}\begin{bmatrix}1\\-\sqrt2\\1\end{bmatrix}+c_3e^{(2+\sqrt 2)t}\begin{bmatrix}1\\\sqrt2\\1\end{bmatrix}$$

I considered $c_1=c_2=c_3=1$ and tried to plot a solution using the following with ParametricPlot3D:

ParametricPlot3D[{ E^(-2 u) + E^(-2 u + u Sqrt[2]) +
   E^(-2 u - u Sqrt[2]), 
  Sqrt[2] E^(-2 u + u Sqrt[2]) - 
   Sqrt[2] E^(-2 u - u Sqrt[2]), -E^(-2 u) + E^(-2 u + u Sqrt[2]) - 
   E^(-2 u - u Sqrt[2])}, {u, -1, 10}, PlotTheme -> "Marketing"]

I get a nice solution curve based on a single initial condition, but is there a nice way to plot many general solutions together?

Post Undeleted by Leonidas Lanier
Post Deleted by Leonidas Lanier
Source Link

Plotting Phase Portrait for $3\times 3$ linear system of DEs

So I have very little experience in Mathematica but would like to learn how to plot. I have seen a few threads on this for $2\times 2$ systems but not for $3\times 3$.

So I'm trying to plot the phase portrait of the solution to the following equation:

$$\begin{bmatrix}x_1\\x_2\\x_3\end{bmatrix}'=\begin{pmatrix}-2&1&0\\1&-2&1\\0&1&-2\end{pmatrix}\begin{bmatrix}x_1\\x_2\\x_3\end{bmatrix}$$

To make matters easier, I found a general solution:

$$\begin{bmatrix}x_1\\x_2\\x_3\end{bmatrix}=c_1e^{2t}\begin{bmatrix}1\\0\\-1\end{bmatrix}+c_2e^{(2-\sqrt2)t}\begin{bmatrix}1\\-\sqrt2\\1\end{bmatrix}+c_3e^{(2+\sqrt 2)t}\begin{bmatrix}1\\\sqrt2\\1\end{bmatrix}$$

I considered $c_1=c_2=c_3=1$ and tried to plot a solution using the following with ParametricPlot3D:

    ParametricPlot3D[{E^(-2 u) + E^(-2 u + Sqrt[2]) + E^(-2 u - Sqrt[2]), 
  Sqrt[2] E^(-2 u + Sqrt[2]) - Sqrt[2] E^(-2 u - Sqrt[2]), -E^(-2 u) +
    E^(-2 u + Sqrt[2]) + E^(-2 u - Sqrt[2])}, {u, -1, 10}]

However I only get a diagonal blue line as my solution. Is this a valid approach to plotting a solution curve? If so, how can I make it plot correctly? If not, what should I consider trying (keeping in mind my ability in Mathematica is limited)?