de-CH
utf-8
math
SCP in function spaces (polynomial)
skp-02-02
multiple
512
randRangeExclude(-5,5,[-1,0,1]) randRange(2,5) randRange(2,5) randRange(2,5)

Given the Euclidean vector space \left(\mathcal P_{\leq 2}, \langle \ , \ \rangle \right) with \displaystyle \langle p, q \rangle = \int_{-1}^{1} f(x)g(x) \; dx.

Compute the SCP for {\color{red}p}, \ {\color{blue}q} \; : [-1,1] \to \mathbb R with {\color{red}p(x) = Ax^2 + Bx +C} und {\color{blue}q(x) = Dx + 1}.

\langle p, q \rangle = (2*(B*D+A)+6*C)/3

Compute the SCP, i.e. the integral \displaystyle \langle p, q \rangle = \int_{-1}^{1} {\color{red}p(x)}\ {\color{blue}q(x)} \; dx with the fundamental theorem of Calculus.

This becomes \displaystyle \int_{-1}^{1} {\color{red}\left(Ax^2 + Bx +C\right)}\ {\color{blue}(Dx + 1)} \; dx = \left(negParens(fractionReduce(A*D,4))x^4 + fractionReduce(B*D+A,3)x^3 + fractionReduce(C*D+B,2)x^2 + Cx \right)\biggl|_{-1}^{1} = fractionReduce(2*(B*D+A)+6*C,3).