Question: Galerkin Finite element method

Hellow , Any body can help me to write the codes for the differential equation to solve by Galerkin finite element method by four elements by taking step size h=pi/2 and compare with homotropy method by plotting the graph of Galerkin method, homotropy method and exact, here is my codes

ode := diff(y(x), x, x) + y(x)-1=0:
ics := y(0) = 0, y(2*pi) = 0:
dsolve({ics, ode}):
 

Please Wait...