0
2.9kviews
Solve the following differential equation using Galerkin Method. Compare the answer with exact solution at x = 4 and x = 5

Solve the following differential equation using Galerkin Method.

$\frac{-d}{dx}[(x - 1)\frac{dy}{d}] = x^2; \hspace{2cm} 3 \leq x \leq 5$

Boundary conditions are u(5) = 10 & u'(3) = 5. Compare the answer with exact solution at x = 4 and x = 5


1 Answer
0
80views

General D.E. is given by,

$ - \frac{d}{dx}[(x-1) \frac{du}{dx}] = x^2; \hspace{0.5cm} 3 \leq x \leq 5 $

Simplified as,

$ - [(x-1) \frac{d^2u}{dx^2} + \frac{du}{dx}] = x^2 $

With boundary condition,

u(5) = 10 and u'(3) = 5

Approximate solution is given by,

$ u = C_0 + C_1x + C_2x^2 + C_3x^3 $

Imposing boundary conditions at x = 5 and u = 10,

$ 10 = C_0 + 5C_1 + 25C_2 + 125C_3 \\ \therefore C_0 = 10 - 5C_1 - 25C_2 - 125C_3 $

Now, therefore

$ u = 10 - 5C_1 - 25C_2 - 125C_3 + C_1x + C_2x^2 + C_3x^3 \\ \therefore u = C_1(x-5) + C_2(x^2-25) + C_3(x^3-125) + 10 $

Differentiating above equation,we get,

$ \frac{du}{dx} = C_1 + 2C_2x + 3C_3x^2 $

Now at x = 3, $\frac{du}{dx}$ = 5

$ \therefore 5 = C_1 + 6C_2 + 27C_3 \\ \therefore C_1 = 5 - 6C_2 - 27C_3 $

Now, therefore,

$ u = (5 - 6C_2 - 27C_3)(x-5) + C_2(x^2-25) + C_3(x^3-125) + 10 \\ \therefore u = C_2(x^2 - 6x + 5) + C_3(x^3-27x+10) + 5(x-5) + 10 $

Residual function,

$ (x-1) \frac{d^2u}{dx^2} +\frac{du}{dx} + x^2 = R \\ \frac{du}{dx} = C_2(2x-6) + C_3(3x^2-27) + 5 \hspace{1cm} [\because u = C_2(x^2 - 6x + 5) + C_3(x^3-27x+10) + 5(x-5) + 10] \\ \frac{d^2u}{dx^2} = 2C_2 + 6xC_3 $

Therefore, above equation becomes,

$ (x-1)(2C_2 + 6xC_3) + C_2(2x-6) + C_3(3x^2-27) + 5 + x^2 = R \\ C_2[2x-2+2x-6] + C_3[6x^2-6x+3x^2-27] + [5+x^2] = R \\ C_2(4x-8) + C_3(9x^2-6x-27) + (5+x^2) = R $

Weighted integral form,

$ \int_3^5 w_iR \,\, dx = 0 \\ \int_3^5 w_i [C_2(4x-8) + C_3(9x^2-6x-27) + (5+x^2)] \,\, dx = 0 $

Galerkin method, w$_i$ = coefficient of constant from u

For i = 1, $ w_1 = (x^2-6x+5) $

$ \int_3^5 [x^2-6x+5][C_2(4x-8) + C_3(9x^2-6x-27) + (5+x^2)] \,\, dx = 0 \\ C_2 \int_3^5 (x^2-6x+5)(4x-8) \,\, dx + C_3 \int_3^5 (x^2-6x+5)(9x^2-6x-27) \,\, dx + \int_3^5 (x^2-6x+5)(5+x^2) \,\, dx = 0 \\ \therefore -37.33C_2 - 422.4C_3 - 102.933 = 0 \\ \therefore 37.33C_2 + 422.4C_3 = -102.933 \hspace{1cm} .....(A) $

Now for i = 2; $ w_2 = (x^3 - 27x + 10) $

$ \int_3^5 [x^3 - 27x + 10][C_2(4x-8) + C_3(9x^2-6x-27) + (5+x^2) \,\, dx = 0 \\ C_2 \int_3^5 (x^3 - 27x + 10)(4x-8) \,\, dx + C_3 \int_3^5 (x^3 - 27x + 10)(9x^2-6x-27) \,\, dx + \int_3^5 (x^3 - 27x + 10)(5+x^2) \,\, dx = 0 \\ -422.4C_2 - 4790.4C_3 - 1162.7 = 0 \\ 422.4C_2 + 4790.4C_3 = - 1162.7 \hspace{1cm} .....(B) $

By solving equation (A) and (B), we get,

C$_2$ = -4.87 and C$_3$ = 0.186

Approximate solution is given by,

$ u = -4.87(x^2-6x+5) + 0.186(x^3-27x+10) + 5(x-5) + 10 $

Now,

At x = 4; u = 13.286

At x = 5; u = 10

Exact solution,

$ - \frac{d}{dx}[(x-1) \frac{du}{dx}] = x^2 $

Integrating on both the sides,

$ (x-1) \frac{du}{dx} = - \frac{x^3}{3} + c $

Now, at x = 3, $\frac{du}{dx}$ = 5

Therefore, c = 19

$ \therefore \frac{du}{dx} = - \frac{x^3}{3(x-1)} + \frac{19}{x-1} $

Integrating on both the sides, we get,

$ \int du = - \frac{1}{3} \int \frac{x^3}{x-1} \,\, dx + 19 \int \frac{1}{x-1} \,\, dx \\ \int du = - \frac{1}{3} \int \frac{x^3-1}{x-1} + \frac{1}{x-1} \,\, dx + 19 \int \frac{1}{x-1} \,\, dx \\ u = - \frac{1}{3} \int [ \frac{(x-1)(x^2+x+1)}{x-1} + \frac{1}{x-1}] \,\, dx + 19 log(x-1) + c \\ u = - \frac{1}{3} \int (x^2+x+1) \,\, dx - \frac{1}{3} \int \frac{1}{x-1} \,\, dx + 19log(x-1) + c \\ u = - \frac{1}{3} (\frac{x^3}{3} + \frac{x^2}{2} + x) - \frac{1}{3} log(x-1) + 19 log(x-1) + c_1 \\ u = - \frac{1}{3} (\frac{x^3}{3} + \frac{x^2}{2} + x) + \frac{56}{3} log(x-1) + c_1 $

Now at x = 5, u = 10, therefore c$_1$ = 3.82

$ \therefore u = - \frac{1}{3} ( \frac{x^3}{3} + \frac{x^2}{2} + x) + \frac{56}{3} log(x-1) + 3.82 $

Now at x = 4, u = 13.21

at x = 5, u = 10

Please log in to add an answer.