kottur
- 53
- 0
Homework Statement
Approximate the function f(x)=sin(\pi x) on the interval [0,1] with the polynomial ax^{2}+bx+c with finding a, b and c.
Homework Equations
f(x)=a_{0}+\sum^{\infty}_{n=1}(a_{n}cos(nx)+b_{n}sin(nx))
a_0=\frac{1}{2\pi}\int^{\pi}_{-\pi}f(x)dx
a_n=\frac{1}{\pi}\int^{\pi}_{-\pi}f(x)cos(nx)dx , (n\geq1)
b_n=\frac{1}{\pi}\int^{\pi}_{-\pi}f(x)sin(nx)dx , (n\geq1)
The Attempt at a Solution
I understand that this is just a matter of filling in the equations but I just don't seem to get it right. I get:
a_{0}=0
a_{n}=-cos(\pi\pi)cos(\pi n)-\frac{n}{\pi}sin(\pi\pi)sin(\pi n)
b_{n}=-cos(\pi\pi)sin(\pi n)-\frac{n}{\pi}sin(\pi\pi)cos(\pi n)
I think I need to simplify this and I don't know how to, plus then I'm not sure how to use it.
Thank you in advance.
Last edited: