Graphics Programs Reference
In-Depth Information
sol =
1/(1-exp(-t)*(-1+x0)/x0)
Note that this includes the zero solution; indeed
bettersol = simplify(sol)
bettersol =
-x0/(-x0-exp(-t)+exp(-t)*x0)
subs(bettersol, x0, 0)
ans =
0
(b)
T = 0:0.1:5;
hold on
solcurves = inline(vectorize(bettersol), 't', 'x0');
for initval = 0:0.25:2.0
plot(T, solcurves(T, initval))
end
axis tight
title 'Solutions of Dx=x-xˆ2, with x(0) = 0, 0.25,..., 2'
xlabel 't'
ylabel 'x'
hold off
Solutions of Dx = x x 2 , with x(0) = 0, 0.25, ..., 2
2
1.8
1.6
1.4
1.2
1
0.8
0.6
0.4
0.2
0
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
5
t
 
Search WWH ::




Custom Search