Using the trial function uℎ(x)=asin(πx) and weighting function wℎ(x)=bsin(πx) find an approximate solution to the following boundary value problems by determining the value of coefficient . For each one, also find the exact solution using Matlab and plot the exact and approximate solutions. (One point each for: (i) finding , (ii) finding the exact solution, and (iii) plotting the solution)
Modify the trial function and find an approximation for the following boundary value problem. (Hint: you will need to add an extra term to the function to make it satisfy the boundary conditions.)
{ uxx - 2 = 0
{ u(0) = 1
{ u(1) = 0