- #1
kottur
- 56
- 0
Homework Statement
Approximate the function [itex]f(x)=sin(\pi x)[/itex] on the interval [itex][0,1][/itex] with the polynomial [itex]ax^{2}+bx+c[/itex] with finding a, b and c.
Homework Equations
[itex]f(x)=a_{0}+\sum^{\infty}_{n=1}(a_{n}cos(nx)+b_{n}sin(nx))[/itex]
[itex]a_0=\frac{1}{2\pi}\int^{\pi}_{-\pi}f(x)dx[/itex]
[itex]a_n=\frac{1}{\pi}\int^{\pi}_{-\pi}f(x)cos(nx)dx , (n\geq1)[/itex]
[itex]b_n=\frac{1}{\pi}\int^{\pi}_{-\pi}f(x)sin(nx)dx , (n\geq1) [/itex]
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:
[itex]a_{0}=0[/itex]
[itex]a_{n}=-cos(\pi\pi)cos(\pi n)-\frac{n}{\pi}sin(\pi\pi)sin(\pi n)[/itex]
[itex]b_{n}=-cos(\pi\pi)sin(\pi n)-\frac{n}{\pi}sin(\pi\pi)cos(\pi n)[/itex]
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: