You almost got it.
That 1/4 term though needs to be multiplied to your first term. Remember how Mark44 wrote it - 1/4 * Integral Stuff. What you did, the substitution and integration by parts, is just the evaluation of the "Integral Stuff" in the equation 1/4 * Integral Stuff. So that 1/4...
Homework Statement
Use FEM to solve this problem. The difficulty lies in the fact that the exact solution has a discontinuity in it. From x=[0,0.6) the exact solution u is x5/20 - x/20 and from x =(0.6,1] u is sin(x). The problem I'm having is I'm not sure what to do at the jump in my code...