I have quadratic finite element - shape function is quadratic. Element spans from 0 to 5.
Body force is given by (in physical coordinates) $$f_b = \int_0^5 N(x)^T b(x) dx \approx \sum_{i=1}^3 N(\xi_i)b_i(x)w_i $$ The last term is obtained from Gauss quadrature. $\xi_i$ are Gauss points and $w_i$ are corresponding weights. Say, $b=x^3$ $$ N_1(x) = ((x-x_2)(x-x_3))/( (x_1-x_2) (x_1-x_3) ) \\ N_2 (x)= ((x-x_1)(x-x_3))/( (x_2-x_1) (x_2-x_3) ) \\ N_3 (x)= ((x-x_1)(x-x_2))/( (x_3-x_1) (x_3-x_2) ) $$ When I transform the problem into isoparametric coordinates, I get
$$f_b = \sum_{i=1}^3 N(\xi_i)b_i(x)w_iJ$$
$$ N_1 = -0.5 \xi (1-\xi)\\ N_2 = (1-\xi^2)\\ N_3 = 0.5\xi(1+\xi)\\ $$
The problem is when I evaluate integrals - in physical and isoparametric coordinates - they do not match. I suspect that I am using $b(x)=x^3$ in isoparametric without converting it. But, even if I multiply $b$ by $J$, problem does not solve. I do not have much idea what is going wrong. Can someone help me?
Edit: As per comments, I checked that when $b$ is a constant, $f_b$ in both coordinates match. So problem comes when $b$ is a function of $x$. I am wondering how to convert $b$ from physical to isoparametric. To be specific, say $b=x^3$. How can I transform and integrate this in isoparametric coordinates?