Graphics Programs Reference
In-Depth Information
ans =
3^301
This does not work because sym , by itself, does not cause an evaluation.
Problem 8
(a)
solve('8*x + 3 = 0', 'x')
ans =
-3/8
(b)
vpa(ans, 15)
ans =
-.375000000000000
(c)
syms p q; solve('xˆ3 + p*x+q=0','x')
ans =
[
1/6*(-108*q+12*(12*p^3+81*q^2)^(1/2))^(1/3)-2*p/(-
108*q+12*(12*p^3+81*q^2)^(1/2))^(1/3)]
[ -1/12*(-108*q+12*(12*p^3+81*q^2)^(1/2))^(1/3)+p/(-
108*q+12*(12*p^3+81*q^2)^(1/2))^(1/3)+1/2*i*3^(1/2)*(1/6*(-
108*q+12*(12*p^3+81*q^2)^(1/2))^(1/3)+2*p/(-
108*q+12*(12*p^3+81*q^2)^(1/2))^(1/3))]
[ -1/12*(-108*q+12*(12*p^3+81*q^2)^(1/2))^(1/3)+p/(-
108*q+12*(12*p^3+81*q^2)^(1/2))^(1/3)-1/2*i*3^(1/2)*(1/6*(-
108*q+12*(12*p^3+81*q^2)^(1/2))^(1/3)+2*p/(-
108*q+12*(12*p^3+81*q^2)^(1/2))^(1/3))]
(d)
ezplot('exp(x)'); hold on; ezplot('8*x - 4'); hold off
 
Search WWH ::




Custom Search