Quantcast
Channel: "Spaghetti"-solutions for ODE nonautonomous system and reduced vector field - Mathematica Stack Exchange
Viewing all articles
Browse latest Browse all 4

"Spaghetti"-solutions for ODE nonautonomous system and reduced vector field

$
0
0

Projections of the 3-dimensional phase-space of a non-autonomous ODE system

Multidimensional obstacle avoidance in ODE (Visualization)

Given simple system of ODE:

$\begin{cases} \dot{x}=g \\ \dot{o}=2 \cdot(-o+x) \\ \dot{g}=(1+\sin(3 t)) \cdot (-g+\frac{df}{do}) \\ \dot{h}=-h+\frac{d^2f}{d^2o} \end{cases}$

where $f = e^{-o^2}$

It is not difficult to construct a 3D trajectory using the command ParametricPlot3D.

Clear["Derivative"]ClearAll["Global`*"]pars = {xs = -1, k = (1 + 1 Sin[3 t])};f = Exp[-(o[t])^2];s = NDSolve[{x'[t] == g[t], o'[t] == 2 (-o[t] + x[t]),     g'[t] == k (-g[t] + D[f, {o[t], 1}]),     h'[t] == -h[t] + D[f, {o[t], 2}], x[0] == xs, o[0] == xs,     g[0] == 0.01, h[0] == 0}, {x, o, g, h}, {t, 0, 200},    MaxSteps -> \[Infinity]];ParametricPlot3D[Evaluate[{o[t], g[t], h[t]} /. s], {t, 0, 200},  PlotPoints -> 100, ColorFunction -> (Hue[#4] &),  BoxRatios -> {1, 1, 1}, PlotRange -> Full]

Questions:

  1. How to combine multiple solutions for different initial conditions on one ParametricPlot3D?
  2. How to plot the final point on the ParametricPlot3D?
  3. How to build a vector field around the trajectory?

Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images