Find the formula $\int_0^1f(x)dx\approx A_0f(0)+A_1f(1)$ that is exact for all functions of the form $f(x)=ae^x+b\cos(\pi x/2)$.
I'm not sure how to go about this. Any solutions/hints are greatly appreciated.
Find the formula $\int_0^1f(x)dx\approx A_0f(0)+A_1f(1)$ that is exact for all functions of the form $f(x)=ae^x+b\cos(\pi x/2)$.
I'm not sure how to go about this. Any solutions/hints are greatly appreciated.
Copyright © 2021 JogjaFile Inc.
$$\int_0^1[ae^x+b\cos(\pi x/2)]{\rm d}x=a(e-1)+\frac{2b}{\pi}=\underbrace{1}_{A_1}\underbrace{(ae)}_{f(1)}+\underbrace{\frac{2b}{(a+b)\pi}}_{A_0}\underbrace{(a+b)}_{f(0)}$$