What are the beginning steps of solving the definite integral of $\ln(x^2)$ on [-1,1] using Gauss-Legendre quadrature with 4 nodes?($\int_{-1}^1\ln x^2 dx$)
I have seen some videos on how to solve using Gauss Legendre and finding the weights by using linear/quadratic/cubic/etc polynomial approximations, but I am not sure if that is the method you use only for integrals of $f(x)$ where $f(x)$ is in the form of x's alone (i.e. $f(x)=5x-4$) or if this is the method you use also when $x$ is inside another function, like natural log, or sine. Can someone help me by writing out the first few steps to solve this integral using Gauss-Legendre?