Two problems here are e
instead of E
and 0.5
instead of 1/2
. For a larger system it would be more reasonable to use Rationalize
instead of substituting all numbers by hand. To get a wider class of solutions we could define a function being a solution of the system of differential equations, where the initial values are parametrized by x0
:
ds[x0_] = Simplify @ DSolve[ Rationalize @ {x'[t] == -0.5*y[t] + 1 + 3*(E^(-2*t)),
y'[t] == 2*x[t] - y[t] - 4 - 4*(E^(-t)),
y[0] == 0,
x[0] == x0}, {x[t], y[t]}, t]
originally x0 == 0
, i.e.
ds[0]
To plot the wider class of solutions we could use ParametricPlot
as in belisarius answer with Show
emphasizing ds[0]
solution as a red thick curve :
Show[
ParametricPlot[{x[t], y[t]} /. Table[ds[x0], {x0, -2, 4, 0.2}],
{t, -1, 10}, Evaluated -> True],
ParametricPlot[{x[t], y[t]} /. ds[0], {t, -1, 10},
PlotStyle -> {Darker@Red, Thickness[0.007]}],
AxesOrigin -> {0, 0}, PlotRange -> {{-1, 6}, {-4, 5}}]
e
, orE
? $\endgroup$