# 5.3 Designer Polynomials # Art Belmonte, Summer 1996 # These are the shaded gray examples which appear in Section 5.3. # In-line plots have been removed to conserve disk space. > restart; f:=x->a*x^3 + b*x^2 + c*x + d; > eq1:=f(-2)=0; eq2:=f(3)=4; 3 2 f := x -> a x + b x + c x + d eq1 := -8 a + 4 b - 2 c + d = 0 eq2 := 27 a + 9 b + 3 c + d = 4 > eq3:=D(f)(-2)=0; eq4:=D(f)(3)=0; eq3 := 12 a - 4 b + c = 0 eq4 := 27 a + 6 b + c = 0 > sol:=solve({eq.(1..4)}, {a, b, c, d}); -8 144 176 12 sol := {a = ---, c = ---, d = ---, b = ---} 125 125 125 125 > g:=subs(sol, f(x)); 3 12 2 144 176 g := - 8/125 x + --- x + --- x + --- 125 125 125 # Yes, this checks out! > plot(g, x=-3..4); >