# Petrov–Galerkin method

The Petrov–Galerkin method is a mathematical method used to obtain approximate solutions of partial differential equations which contain terms with odd order. In these type of problems a weak formulation with similar function space for test function and solution function is not possible. Hence the method is used in case the test function and solution function belong to different function spaces.[1]

## Overview

An example of differential equation containing a term with odd order is as follows:

${\displaystyle a(x){\dfrac {\mathrm {d} u}{\mathrm {d} x}}+b(x){\dfrac {\mathrm {d} ^{2}u}{\mathrm {d} x^{2}}}=f(x),\quad x\in (0,L)\quad \&\quad u(0)=u_{o},\left.{\dfrac {\mathrm {d} u}{\mathrm {d} x}}\right|_{x=L}=u_{L}'}$

If a test function ${\displaystyle v(x)}$ is used to obtain the weak form, after integration by parts the final Galerkin formulation will be given as follows:

${\displaystyle \int _{0}^{L}a(x)v(x){\dfrac {\mathrm {d} u}{\mathrm {d} x}}\mathrm {d} x-\int _{0}^{L}b(x){\dfrac {\mathrm {d} v}{\mathrm {d} x}}{\dfrac {\mathrm {d} u}{\mathrm {d} x}}\mathrm {d} x+\left[b(x)v{\dfrac {\mathrm {d} u}{\mathrm {d} x}}\right]_{0}^{L}=\int _{0}^{L}v(x)f(x)\,\mathrm {d} x}$

The term with even order (2nd term in LHS) is now symmetric, as the test function and solution function both have same order of differentiation and they both belong to ${\displaystyle H_{0}^{1}}$. However, there is no way the first term on LHS can be made this way. In this case the solution space ${\displaystyle H_{0}^{1}}$ and test function space ${\displaystyle L^{2}}$ are different and hence the usually employed Bubnov Galerkin method cannot be used.