To print higher-resolution math symbols, click the
Hi-Res Fonts for Printing button on the jsMath control panel.

No jsMath TeX fonts found -- using image fonts instead.
These may be slow and might not print well.
Use the jsMath control panel to get additional information.
jsMath Control PanelHide this Message


jsMath
jachterToggle Home Published Log Settings Report a Problem Help Sign out
approx
last edited on December 03, 2008 07:07 AM by jachter
     Typeset PrintPrint Worksheet Edit Text Undo Share Publish
a = approx(sin(pi*x))  # What happens if we approximate this function?
for i in range(0,n):
 a[i] 
evaluate
       
[1, x, x^2, x^3, x^4, x^5, x^6, x^7, x^8, x^9]
[1, x, x^2, x^3, x^4, x^5, x^6, x^7, x^8, x^9]
evaluate
       
evaluate
       
evaluate
       
evaluate
       
0.707106781186548
1.224744871391589*x
2.371708245126284*(x^2 - 0.333333333333333)
4.67707173346743*(x^3 - 0.600000000000000*x)
9.280776503073419*(x^4 - 0.857142857142857*(x^2 - 0.333333333333333) -
0.200000000000000)
18.46851205430498*(x^5 - 1.111111111111112*(x^3 - 0.600000000000000*x) -
0.428571428571428*x)
36.80854711374455*(x^6 - 1.363636363636358*(x^4 - 0.857142857142857*(x^2
- 0.333333333333333) - 0.200000000000000) - 0.714285714285714*(x^2 -
0.333333333333333) - 0.142857142857143)
73.42905536558702*(x^7 - 1.615384615384656*(x^5 - 1.111111111111112*(x^3
- 0.600000000000000*x) - 0.428571428571428*x) - 1.060606060606062*(x^3 -
0.600000000000000*x) - 0.333333333333333*x)
146.5709978245593*(x^8 - 1.866666666666325*(x^6 - 1.363636363636358*(x^4
- 0.857142857142857*(x^2 - 0.333333333333333) - 0.200000000000000) -
0.714285714285714*(x^2 - 0.333333333333333) - 0.142857142857143) -
1.468531468531463*(x^4 - 0.857142857142857*(x^2 - 0.333333333333333) -
0.200000000000000) - 0.606060606060606*(x^2 - 0.333333333333333) -
0.111111111111111)
0.707106781186548
1.224744871391589*x
2.371708245126284*(x^2 - 0.333333333333333)
4.67707173346743*(x^3 - 0.600000000000000*x)
9.280776503073419*(x^4 - 0.857142857142857*(x^2 - 0.333333333333333) - 0.200000000000000)
18.46851205430498*(x^5 - 1.111111111111112*(x^3 - 0.600000000000000*x) - 0.428571428571428*x)
36.80854711374455*(x^6 - 1.363636363636358*(x^4 - 0.857142857142857*(x^2 - 0.333333333333333) - 0.200000000000000) - 0.714285714285714*(x^2 - 0.333333333333333) - 0.142857142857143)
73.42905536558702*(x^7 - 1.615384615384656*(x^5 - 1.111111111111112*(x^3 - 0.600000000000000*x) - 0.428571428571428*x) - 1.060606060606062*(x^3 - 0.600000000000000*x) - 0.333333333333333*x)
146.5709978245593*(x^8 - 1.866666666666325*(x^6 - 1.363636363636358*(x^4 - 0.857142857142857*(x^2 - 0.333333333333333) - 0.200000000000000) - 0.714285714285714*(x^2 - 0.333333333333333) - 0.142857142857143) - 1.468531468531463*(x^4 - 0.857142857142857*(x^2 - 0.333333333333333) - 0.200000000000000) - 0.606060606060606*(x^2 - 0.333333333333333) - 0.111111111111111)
evaluate
       
evaluate
       
0.000000000000000
0.954929658551372*x
0.954929658551372*x
0.954929658551372*x - 2.895604780498532*(x^3 - 0.600000000000000*x)
0.954929658551372*x - 2.895604780498532*(x^3 - 0.600000000000000*x)
1.726905184327746*(x^5 - 1.111111111111112*(x^3 - 0.600000000000000*x) -
0.428571428571428*x) - 2.895604780498532*(x^3 - 0.600000000000000*x) +
0.954929658551372*x
1.726905184327746*(x^5 - 1.111111111111112*(x^3 - 0.600000000000000*x) -
0.428571428571428*x) - 2.895604780498532*(x^3 - 0.600000000000000*x) +
0.954929658551372*x
-0.446220781740244*(x^7 - 1.615384615384656*(x^5 -
1.111111111111112*(x^3 - 0.600000000000000*x) - 0.428571428571428*x) -
1.060606060606062*(x^3 - 0.600000000000000*x) - 0.333333333333333*x) +
1.726905184327746*(x^5 - 1.111111111111112*(x^3 - 0.600000000000000*x) -
0.428571428571428*x) - 2.895604780498532*(x^3 - 0.600000000000000*x) +
0.954929658551372*x
-0.446220781740244*(x^7 - 1.615384615384656*(x^5 -
1.111111111111112*(x^3 - 0.600000000000000*x) - 0.428571428571428*x) -
1.060606060606062*(x^3 - 0.600000000000000*x) - 0.333333333333333*x) +
1.726905184327746*(x^5 - 1.111111111111112*(x^3 - 0.600000000000000*x) -
0.428571428571428*x) - 2.895604780498532*(x^3 - 0.600000000000000*x) +
0.954929658551372*x
0.000000000000000
0.954929658551372*x
0.954929658551372*x
0.954929658551372*x - 2.895604780498532*(x^3 - 0.600000000000000*x)
0.954929658551372*x - 2.895604780498532*(x^3 - 0.600000000000000*x)
1.726905184327746*(x^5 - 1.111111111111112*(x^3 - 0.600000000000000*x) - 0.428571428571428*x) - 2.895604780498532*(x^3 - 0.600000000000000*x) + 0.954929658551372*x
1.726905184327746*(x^5 - 1.111111111111112*(x^3 - 0.600000000000000*x) - 0.428571428571428*x) - 2.895604780498532*(x^3 - 0.600000000000000*x) + 0.954929658551372*x
-0.446220781740244*(x^7 - 1.615384615384656*(x^5 - 1.111111111111112*(x^3 - 0.600000000000000*x) - 0.428571428571428*x) - 1.060606060606062*(x^3 - 0.600000000000000*x) - 0.333333333333333*x) + 1.726905184327746*(x^5 - 1.111111111111112*(x^3 - 0.600000000000000*x) - 0.428571428571428*x) - 2.895604780498532*(x^3 - 0.600000000000000*x) + 0.954929658551372*x
-0.446220781740244*(x^7 - 1.615384615384656*(x^5 - 1.111111111111112*(x^3 - 0.600000000000000*x) - 0.428571428571428*x) - 1.060606060606062*(x^3 - 0.600000000000000*x) - 0.333333333333333*x) + 1.726905184327746*(x^5 - 1.111111111111112*(x^3 - 0.600000000000000*x) - 0.428571428571428*x) - 2.895604780498532*(x^3 - 0.600000000000000*x) + 0.954929658551372*x
evaluate
       
evaluate
       
evaluate
       
evaluate
       
evaluate
       
1.103638323514327*x + 1.175201193643801
1.103638323514327*x + 1.175201193643801