I try to plot a phase diagram with ParametricPlot but everytime Mathematica does nothing.
I start by ;
sol = Solve[{α A k^(α - 1) - ρ - δ == 0, A k^α - δ k - c == 0}, {c, k}] // FullSimplify
{csol, ksol} = {sol[[1, 1, 2]], sol[[1, 2, 2]]}
Clear[dec, dek, α, A, σ, ρ, δ];
dec = c'[t] == -(c[t]/σ) (A α k[t] ^(α - 1) - δ - ρ);
dek = k'[t] == -(A k[t]^α - c[t] - δ k[t]);
Clear[α, σ, ρ, δ];
α = 0.3; σ = 1; ρ = 0.04; δ = 0.02; A = 1;
Clear[nsba, cb, kb, cf, kf];
nsba = NDSolve[ {dec, dek, c[0] == csol (1 - 10^-5), k[0] ==
ksol (1 - 10^-5)}, {c[t], k[t]}, {t, 0, 255}]
cb[t_] := Evaluate[nsba[[1, 1, 2]]]
kb[t_] := Evaluate[nsba[[1, 2, 2]]]
Clear[tende];
tende = 164;
cf[t_] := cb[tende - t]
kf[t_] := kb[tende - t]
After all, I try this last command ;
tra = ParametricPlot[{kf[t], cf[t]}, {t, 0, tende},
AxesLabel -> {k, c}, PlotStyle -> Thickness[0.01]];
Mathematica stays actionless. What could be the eventual problem ?
Solve[ ]
working for you? What is returning as solutions? $\endgroup$Solve
doesn't seem to work for me as written (it throws multiple errors). $\endgroup$