Řešení diferenciálních rovnic na přímce

\(y\ '\  = \ x\/\(x\^2 + 1\)\ , \ y \((0)\) = \ 0
\)

res = DSolve[y'[x] == x/(x^2 + 1), y[x], x]

res = DSolve[{y'[x] == x/(x^2 + 1), y[0] == 0}, y[x], x]

fce = res[[1]][[1]][[2]]

Plot[fce, {x, 0, 1}]

Plot[y[x] /. res, {x, 0, 1}]

y ' = (((e^x)-(e^(-x)))/2) , y (0) =  1

res = DSolve[y'[x] == (Exp[x] - Exp[-x])/2, y[x], x]

res = 
      DSolve[{y'[x] == (Exp[x] - Exp[-x])/2, y[0] == 1}, y[x], x]

fce = res[[1]][[1]][[2]]

Plot[fce, {x, 0, 1}]

Řešení lineárních diferenciálních rovnic v rovině

\(
x' = \(x + 3 y\ \ \ \ \ \ \ \ \ \ \ \ \ \ x \((0)\) = 0\)

      y' = \ \(4 x\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ y \((0)\) = 7\)\)

res = 
      DSolve[{x'[t] == x[t] + 3 y[t], y'[t] == 4 x[t]}, {x[t], 
          y[t]}, t]

res = 
      DSolve[{x'[t] == x[t] + 3 y[t], y'[t] == 4 x[t], x[0] == 0, 
          y[0] == 7}, {x[t], y[t]}, t]

fcex = res[[1]][[1]][[2]]

Plot[fcex, {t, 0, 1}]

fcey = res[[1]][[2]][[2]]

Plot[fcey, {t, 0, 1}]

ParametricPlot[{fcex, fcey}, {t, 0, 1}]

\(

      x' = \(\(-y\)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ x \((0)\) = 5\)

      y' = \ \ \ 
        \(x\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ y \((0)\) = 0\)\)

res = 
      DSolve[{x'[t] == - y[t], y'[t] ==  x[t]}, {x[t], y[t]}, t]

res = 
      DSolve[{x'[t] == - y[t], y'[t] ==  x[t], x[0] == 5, 
          y[0] == 0}, {x[t], y[t]}, t]

fcex = res[[1]][[1]][[2]]

Plot[fcex, {t, 0, 2  Pi}]

fcey = res[[1]][[2]][[2]]

Plot[fcey, {t, 0, 2  Pi}]

ParametricPlot[{fcex, fcey}, {t, 0, 2  Pi}]

Řešení nelineárních diferenciálních rovnic v rovině

\(

      x' = \(ln[y\^2\ \  - x\ ]\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ x \((0)\) = 
          \(2
y' = \ \ \ 
            \(x - y - 
                1\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ y \((0)\) = 2
              \)\)\)\)

res = 
      DSolve[{x'[t] == Log[y[t]^2 - x[t]], 
          y'[t] ==  x[t] - y[t] - 1}, {x[t], y[t]}, t]

res = 
      NDSolve[{x'[t] == Log[y[t]^2 - x[t]], 
          y'[t] ==  x[t] - y[t] - 1, x[0] == 2, y[0] == 2}, {x[t], 
          y[t]}, {t, 0, 10}]

Plot[x[t] /. res, {t, 0, 10}]

Plot[y[t] /. res, {t, 0, 10}, PlotRange -> All]

ParametricPlot[{x[t], y[t]} /. res, {t, 0, 10}, Compiled -> False, 
      PlotRange -> All]

\(

      x' = \(\(-y\) + 
            x \((1 - x\^2 - y\^2\ )\)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ x 
              \((0)\) = 1\)

      y' = \ \ \ 
        \(x + y \((1 - x\^2 - y\^2\ )\)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ y 
              \((0)\) = 0\)\)

res = 
      DSolve[{x'[t] == -y[t] + x[t] (1 - x[t]^2 - y[t]^2), 
          y'[t] == x[t] + y[t] (1 - x[t]^2 - y[t]^2)}, {x[t], y[t]}, 
        t]

res = 
      NDSolve[{x'[t] == -y[t] + x[t] (1 - x[t]^2 - y[t]^2), 
          y'[t] == x[t] + y[t] (1 - x[t]^2 - y[t]^2), x[0] == 2, 
          y[0] == 0}, {x[t], y[t]}, {t, 0, 150}]

Plot[x[t] /. res, {t, 0, 150}]

Plot[y[t] /. res, {t, 0, 150}]

g1 = 
      ParametricPlot[{x[t], y[t]} /. res, {t, 0, 150}, Compiled -> False]

res = 
      NDSolve[{x'[t] == -y[t] + x[t] (1 - x[t]^2 - y[t]^2), 
          y'[t] == x[t] + y[t] (1 - x[t]^2 - y[t]^2), x[0] == 0.1, 
          y[0] == 0}, {x[t], y[t]}, {t, 0, 150}]

g2 = 
      ParametricPlot[{x[t], y[t]} /. res, {t, 0, 150}, Compiled -> False]

Show[{g1, g2}]

Řešení lineárních diferenciálních rovnic v prostoru

x' = -3 x + 4 y - 
              2 z                 x (0) = 1y' =    
        x                   + 
            z                 y (0) = 1z ' =   
          6 x - 6 y + 5 z                  z (0) = 1

res = 
      DSolve[{x'[t] == -3 x[t] + 4  y[t] - 2  z[t], 
          y'[t] == x[t] + z[t], 
          z'[t] == 6  x[t] - 6  y[t] + 5  z[t]}, {x[t], y[t], z[t]}, t]

res = 
      DSolve[{x'[t] == -3 x[t] + 4  y[t] - 2  z[t], 
          y'[t] == x[t] + z[t], z'[t] == 6  x[t] - 6  y[t] + 5  z[t], 
          x[0] == 1, y[0] == 1, z[0] == 1}, {x[t], y[t], z[t]}, t]

fcex = res[[1]][[1]][[2]]

fcey = res[[1]][[2]][[2]]

fcez = res[[1]][[3]][[2]]

Plot[fcex, {t, 0, 5}]

Plot[fcey, {t, 0, 5}]

Plot[fcey, {t, 0, 5}]

ParametricPlot3D[{fcex, fcey, fcez}, {t, 0, 1}, BoxRatios -> {1, 1, 1}]