0
1.3kviews
Solve the following differential equation using Galerkin Method

Solve the following differential equation using Galerkin Method

d2ϕdx2+cosπx=00x1

Boundary conditions are ϕ(0)=0ϕ(1)=0

Find ϕ(0.25),ϕ(0.5)&ϕ(0.75).

Compare your answers with exact solution.


1 Answer
0
3views

Given differential equation d2ϕdx2+cosπx=0 where 0x1 with boundary conditions ϕ(0)=0;ϕ(1)=0

Approximate solution is given by,

ϕ=C0+[Cisin(π2(2i1)x)] ......(0)

At x = 0, ϕ=0,C0=0ϕ=[Cisin(π2(2i1)x)]

Since the order of D.E is 2, so i will be of order 3

ϕ=C1sin(πx2)+C2sin(3πx2)+C3sin(5πx2)

At x = 1, ϕ=0

0=C1C2+C3C2=C1+C3

Equation (1) becomes,

ϕ=C1sin(πx2)+(C1+C3)sin(3πx2)+C3sin(5πx2)ϕ=C1[sin(πx2)+sin(3πx2)]+C3[sin(3πx2)+sin(5πx2)]

Differentiating the above equation, we get,

dϕdx=C1π2[cos(πx2)+3cos(3πx2)+C3π2[3cos(3πx2)+5cos(5πx2)

Again differentiating above equation, we get,

d2ϕdx2=C1π44(sinπx2+9sin3πx2)C3π24(9sin3πx2+25sin5πx2)

Residual function is given by,

d2ϕdx2cosπx=R

Substituting the value of (d2ϕdx2) in above equation, we get,

π44[C1(sinπx2+9sin3πx2)+C3(9sin3πx2+25sin5πx2)]cosπx=R

Weighted Integral form,

10wiRdx=0

wi = coefficient of constant from ϕ

For i = 1, w1=sinπx2+sin3πx2π2410(sinπx2+sin3πx2)[C1(sinπx2+9sin3πx2)+C3(9sin3πx2+25sin5πx2)cosπx]dx=05C1+2.84C30.069=05C1+2.84C3=0.069.....(A)

For i = 2, w2=sin3πx2+sin5πx2C110(sin3πx2+sin5πx2)(sinπx2+sin3πx2)dx+C310(sin3πx2+sin5πx2)(9sin3πx2+25sin5πx2)dx10(sin3πx2+sin5πx2)cosπxdx=03.9C1+14.75C30.207=03.9C1+14.75C3=0.207.....(B)

Solving (A) and (B), we get,

C1 = 0.0069 and C3 = 0.0122

Approximate solution is given by,

ϕ=0.0069(sinπx2+sin3πx2)+0.0122(sin3πx2+sin5πx2)

i) At x = 0.25; ϕ = 0.02210

ii) At x = 0.5; ϕ = 0.03155

iii) At x = 0.75; ϕ = 0.0249

Exact solution:

d2ϕdx2cosπx=0i.e.d2ϕdx2=cosπx

Integrating above equation, we get,

dϕdx=sinπxπ+C1

Again integrating, we get,

ϕ=cosπxπ2+C1x+C2C2=1π2

Imposing boundary condition

At x = 0; ϕ = 0

0=1π2+C21π2=C2

ϕ=cosπxπ2+C1x+1π2

At x = 1; ϕ1 = 0

0=1π2+C1+1π2C1=2π2ϕ=cosπxπ22xπ2+1π2ϕ=cosπxπ2+2xπ21π2

At x = 0.25; ϕ = 0.0207

At x = 0.5; ϕ = 0

At x = 0.75; ϕ = - 0.02098

Please log in to add an answer.