{VERSION 6 0 "IBM INTEL NT" "6.0" }
{USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0
1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0
0 0 1 }{CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }
{CSTYLE "" -1 256 "Geneva" 1 10 0 0 0 1 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "
" -1 257 "Geneva" 1 10 0 0 0 1 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 258
"" 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 259 "" 0 1 0 0 0 1
0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 260 "Geneva" 1 10 0 0 0 1 0 0 0 0
0 0 0 0 0 1 }{CSTYLE "" -1 261 "Geneva" 1 10 0 0 0 1 0 0 0 0 0 0 0 0
0 1 }{CSTYLE "" -1 262 "Geneva" 1 10 0 0 0 1 0 0 0 0 0 0 0 0 0 1 }
{CSTYLE "" -1 263 "Geneva" 1 10 0 0 0 1 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "
" -1 264 "Geneva" 1 10 0 0 0 1 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 265
"Geneva" 1 10 0 0 0 1 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 266 "Geneva"
1 10 0 0 0 1 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 267 "Geneva" 1 10 0 0
0 1 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 268 "Geneva" 1 10 0 0 0 1 0 0
0 0 0 0 0 0 0 1 }{CSTYLE "" -1 269 "" 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1
}{CSTYLE "" -1 270 "" 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1
271 "Geneva" 1 10 0 0 0 1 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 272 "Gene
va" 1 10 0 0 0 1 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 273 "Geneva" 1 10
0 0 0 1 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 274 "Geneva" 1 10 0 0 0 1
0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 275 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0
0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2
2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 1"
-1 3 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1
0 0 6 6 1 0 1 0 2 2 0 1 }{PSTYLE "R3 Font 0" -1 256 1 {CSTYLE "" -1
-1 "Monaco" 1 9 0 0 255 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2
2 0 1 }{PSTYLE "Heading 1" -1 257 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0
0 1 2 1 2 2 2 2 1 1 1 1 }3 1 0 0 6 6 1 0 1 0 2 2 0 1 }{PSTYLE "Heading
2" -1 258 1 {CSTYLE "" -1 -1 "Times" 1 14 0 0 0 1 2 1 2 2 2 2 1 1 1
1 }3 1 0 0 4 4 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 3" -1 259 1 {CSTYLE "
" -1 -1 "Times" 1 12 0 0 0 1 1 1 2 2 2 2 1 1 1 1 }3 1 0 0 0 0 1 0 1 0
2 2 0 1 }{PSTYLE "" 0 260 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0
0 0 0 0 0 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }}
{SECT 0 {PARA 257 "" 0 "" {TEXT -1 49 "A Quadratic Approximation for t
he Cosine Function" }}{PARA 258 "" 0 "" {TEXT -1 9 "Jim Herod" }}
{PARA 258 "" 0 "" {TEXT -1 12 "P O Box 1038" }}{PARA 260 "" 0 ""
{TEXT 275 25 "Grove Hill, Alabama 36451" }}{PARA 259 "" 0 "" {TEXT -1
21 "herod@math.gatech.edu" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "
" 0 "" {TEXT 256 112 " This worksheet is concerned with getting a \+
quadratic approximations for the cosine function on the interval" }}
{PARA 0 "" 0 "" {TEXT 274 33 " [-" }
{XPPEDIT 18 0 "Pi/2;" "6#*&%#PiG\"\"\"\"\"#!\"\"" }{TEXT -1 2 ", " }
{XPPEDIT 18 0 "Pi/2;" "6#*&%#PiG\"\"\"\"\"#!\"\"" }{TEXT -1 2 " ]" }}
{PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 273 88 "After all, the graph of t
he cosine function does look like a quadratic on that interval." }}
{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 29 "M
ethod 1: Choose three points" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA
0 "" 0 "" {TEXT 257 207 " One way to think of getting a quadratic \+
approximation for the cosine function is to choose three points and fi
nd the quadratic that exactly goes through those three points. We choo
se the three points [-" }{XPPEDIT 18 0 "Pi;" "6#%#PiG" }{TEXT -1 0 ""
}{TEXT 267 20 "/2, 0], [0,1], and [" }{XPPEDIT 18 0 "Pi;" "6#%#PiG" }
{TEXT -1 0 "" }{TEXT 268 60 "/2,0]. All three of these lie on the grap
h of the quadratic." }{TEXT 258 31 "\n We seek the quadratic -- "
}{XPPEDIT 18 0 "Q(x)=a*x^2+b*x+c" "6#/-%\"QG6#%\"xG,(*&%\"aG\"\"\"*$F'
\"\"#F+F+*&%\"bGF+F'F+F+%\"cGF+" }{TEXT -1 22 " -- determined by the \+
" }{TEXT 259 26 "conditions that Q(0)=1, Q(" }{XPPEDIT 18 0 "Pi;" "6#%
#PiG" }{TEXT -1 0 "" }{TEXT 269 14 "/2)=0, and Q(-" }{XPPEDIT 18 0 "Pi
;" "6#%#PiG" }{TEXT -1 0 "" }{TEXT 270 65 "/2)=0. We only need to solv
e three equations with three unknowns:" }}{PARA 0 "" 0 "" {TEXT -1 0 "
" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "Q:=x->a*x^2+b*x+c;" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "solve(\{Q(0)=1,Q(Pi/2)=0,Q(-
Pi/2)=0\},\{a,b,c\});" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "as
sign(%);" }}}{PARA 0 "" 0 "" {TEXT -1 123 " We name this first of \+
the five quadratics we have computed and superimpose its graph with th
at of the cosine function." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0
19 "Q1:=x->a*x^2+b*x+c;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "
plot(\{cos(t),Q1(t)\},t=-Pi/2..Pi/2);" }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 23 "a:='a': b:='b': c:='c':" }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 0 "" }}}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 ""
{TEXT -1 0 "" }}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 28 "Method 2: Choose \+
five points" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT
260 256 " We present an alternate method to that above for determi
ng a quadratic approximation for cos(x). Choose more than three point
s on the graph of the cosine function and find the quadratic by gettin
g the \"least squared\" solution. We know the cosine of -" }{XPPEDIT
18 0 "Pi;" "6#%#PiG" }{TEXT -1 0 "" }{TEXT 271 7 "/4 and " }{XPPEDIT
18 0 "Pi;" "6#%#PiG" }{TEXT -1 0 "" }{TEXT 272 100 "/4. We add these \+
two to the three points in Method 1 to make five points to determine a
quadratic.\n" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "d1:=-Pi/2: \+
d2:=-Pi/4: d3:= 0: d4:=Pi/4: d5:=Pi/2:" }}}{PARA 0 "" 0 "" {TEXT 261
136 "We get the least squares solution for these five equations with t
hree unknowns. The statistics package contains a least squares routine
." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 12 "with(stats):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1
0 24 "xcord:=[d1,d2,d3,d4,d5];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT
1 0 49 "ycord:=[cos(d1),cos(d2),cos(d3),cos(d4),cos(d5)];" }}}{EXCHG
{PARA 0 "> " 0 "" {MPLTEXT 1 0 53 "fit[leastsquare[[x,y],y=a*x^2+b*x+c
]]([xcord,ycord]);" }}}{PARA 0 "" 0 "" {TEXT -1 100 " We assign th
e result of the fit to determiningmpare the graph of Q2 and of the cos
ine function." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "Q2:=unapply
(rhs(%),x);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "
> " 0 "" {MPLTEXT 1 0 35 "plot(\{cos(t),Q2(t)\},t=-Pi/2..Pi/2);" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{PARA 0 "" 0 "" {TEXT
-1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 3 "" 0 ""
{TEXT -1 31 "Method 3: A close hug at x = 0." }}{PARA 0 "" 0 "" {TEXT
-1 0 "" }}{PARA 0 "" 0 "" {TEXT 262 338 " The classical quadratic \+
approximation for the cosine function is one that fits the graph of th
e cosine function best at x = 0. This method is the \"natural one\" fr
om the perspective of differential calculus: this quadratic has the sa
me value, the same first derivative, and the same second derivative at
0 as the cosine function does." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT
1 0 17 "Q3:=t->-t^2/2 +1;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0
35 "plot(\{cos(t),Q3(t)\},t=-Pi/2..Pi/2);" }}}{EXCHG {PARA 0 "> " 0 "
" {MPLTEXT 1 0 0 "" }}}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "
" {TEXT -1 0 "" }}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 66 "Method 4: The a
rea between the two graphs is as small as possible." }}{PARA 0 "" 0 "
" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 5 " " }{TEXT 263 53 "Th
is time, we ask that the square of the integral of " }}{PARA 0 "" 0 "
" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 18 " " }
{XPPEDIT 18 0 "(cos(x)-(a*x^2+b*x+c))^2;" "6#*$,&-%$cosG6#%\"xG\"\"\",
(*&%\"aGF)*$F(\"\"#F)F)*&%\"bGF)F(F)F)%\"cGF)!\"\"F." }}{PARA 0 "" 0 "
" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 264 105 "should be as small as
possible. We compute this integral, and recognize it as a function of
a, b, and c.\n" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 61 "h:=(a,b,c
)->int((cos(x) - (a*x^2 + b*x +c))^2,x=-Pi/2..Pi/2);" }}}{EXCHG {PARA
0 "> " 0 "" {MPLTEXT 1 0 9 "h(a,b,c);" }}}{PARA 0 "" 0 "" {TEXT -1 0 "
" }}{PARA 0 "" 0 "" {TEXT -1 5 " " }{TEXT 265 184 "The problem is \+
to find a, b, and c that make this value as small as possible. To fin
d such a point, we take the derivative's with respect to a, b, and c a
nd find where these are zero." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1
0 80 "solve(\{diff(h(a,b,c),a)=0,diff(h(a,b,c),b)=0,\n diff(h(a,b,
c),c)=0\},\{a,b,c\});" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "as
sign(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "Q4:=x->a*x^2+b*
x+c;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "plot(\{Q4(x),cos(x)
\},x=-Pi/2..Pi/2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "a:='a
': b:='b': c:='c':" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}
{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 80 "M
ethod 5: The quadratic has the same first three moments as the cosine \+
function." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT
266 167 " In this last method, we find the quadratic which has the
first three moments the same as the first three moments of the cosine
function on the interval [-/2, /2]." }}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 216 "solve(\{int(cos(x),x=-Pi/2..Pi/2) = int(a*x^2+b*x+c,
x=-Pi/2..Pi/2),\n\011int(x*cos(x),x=-Pi/2..Pi/2) = int(x*(a*x^2+b*x+c)
,x=-Pi/2..Pi/2),\n\011int(x^2*cos(x),x=-Pi/2..Pi/2) = int(x^2*(a*x^2+b
*x+c),x=-Pi/2..Pi/2)\},\n\011\{a,b,c\});" }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 10 "assign(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0
55 "Q5:=x->a*x^2+b*x+c;\nplot(\{Q5(x),cos(x)\},x=-Pi/2..Pi/2);" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "
" {MPLTEXT 1 0 0 "" }}}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA
3 "" 0 "" {TEXT -1 25 "Exercise for the students" }}{PARA 0 "" 0 ""
{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 81 "Find three different cubi
c approximations to the sine function on the interval [ " }{XPPEDIT
18 0 "-Pi/2" "6#,$*&%#PiG\"\"\"\"\"#!\"\"F(" }{TEXT -1 3 ", " }
{XPPEDIT 18 0 "Pi/2" "6#*&%#PiG\"\"\"\"\"#!\"\"" }{TEXT -1 3 " ]." }}}
}{MARK "0 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2
33 1 1 }