Sunday, 29 May 2022

Fractional Differential Equations

Fractional Differential Equations

Haven’t written a single blog in 2021, this shows how 2021 went - many beautiful memories.

Let me resume with one of the most interesting topics in Calculus - Differential Equaltions.

It is a way of expressing real world dynamical systems in terms of derivatives in an equation.

So, a differential equation of the form given below is of order 2
d2dx2y+ddxy+c=D \frac{\mathrm{d}^2}{\mathrm{d}x^2}y + \frac{\mathrm{d}}{\mathrm{d}x}y+c=D

Note the term real world, so we understand that in the real world having a whole number as the order will be impossible.

Motivation: Dr Peyman | Solving a Fractional Differential Equation | Youtube

Therefore, in this blog we will understand (with an example) on how to solve a differential equation of fractional order or fractional differential equation.

But before moving forward, we brush-up on some important concepts. I will deal with these in a very shallow yet exhaustive manner.

Gamma Function:

The Gamma Function is defined as an integral
Γ(z)=0ettz1dt(1)\tag*{(1)} \boxed{\Gamma(\mathrm{z})=\int_{0}^{\infty}e^{-t}t^{z-1}\mathrm{d}t}
While, we can write another separate blog on the properties of Gamma Function, we shall limit ourselves to the definition of the the function only in this blog.
Some important definitions related to the Gamma Function are as follows:
Γ(z+1)=zΓ(z)(2)\tag*{(2)} \boxed{\Gamma(\mathrm{z+1})=\mathrm{z}\Gamma(\mathrm{z})}
Γ(n+1)=n!(3)\tag*{(3)} \boxed{\Gamma(\mathrm{n+1})=n!}
Γ(n2)=π(n2)!!2(n1)2(4)\tag*{(4)} \boxed{\Gamma(\mathrm{\frac{n}{2}})=\sqrt{\pi}\frac{(n-2)!!}{2^\frac{(n-1)}{2}}}
Eqn (4), opens up another mystery that is double factorial, so we will also explore upon it a little,
5!!=5×3×16!!=6×4××2 5!! = 5 \times 3 \times 1 \\ 6!! = 6 \times 4 \times \times 2 \\
I hope you get the idea. Note: n!!(n!)!n!! \neq (n!)!

Now lets solve a problem to see how it works.

Problem:

D12y=y+x2+83πx32 \mathrm{D}^{\frac{1}{2}}y=-y+x^2+\frac{8}{3\sqrt\pi}x^\frac{3}{2}
We first denote this as equation 5
D12y=y+x2+83πx32(5)\tag*{(5)} \mathrm{D}^{\frac{1}{2}}y=-y+x^2+\frac{8}{3\sqrt\pi}x^\frac{3}{2}
Multiplying D12\mathrm{D}^{\frac{1}{2}} on both sides of equation 5 we get,
D12(D12y)=D12(y+x2+83πx32) \mathrm{D}^{\frac{1}{2}}(\mathrm{D}^{\frac{1}{2}}y)=\mathrm{D}^{\frac{1}{2}}(-y+x^2+\frac{8}{3\sqrt\pi}x^\frac{3}{2})
y=D12y+D12x2+D1283πx32(6)\tag*{(6)} y'=-\mathrm{D}^{\frac{1}{2}}y+\mathrm{D}^{\frac{1}{2}}x^2+\mathrm{D}^{\frac{1}{2}}\frac{8}{3\sqrt\pi}x^\frac{3}{2}
Now, to bring simplicity, we name each term separately and solve.
A=D12yA=(y+x2+83πx32)A=yx283πx32 \mathrm{A}=-\mathrm{D}^{\frac{1}{2}}y \\ \mathrm{A}= -(-y+x^2+\frac{8}{3\sqrt\pi}x^\frac{3}{2}) \\ \boxed{\mathrm{A}=y-x^2-\frac{8}{3\sqrt\pi}x^\frac{3}{2}}
Again,
B=D12x2 \mathrm{B}=\mathrm{D}^{\frac{1}{2}}x^2 \\
Now, how do we calculate the fractional derivative of x2x^2?
The answer will take us back to the person without whom Calculus wouldn’t have been what it is today - Riemann. The generalized defination of a derivative is derived from Riemann-Liouville definition for fractional derivative.

dqdxqxm=Γ(m+1)Γ(mq+1)x(mq) \frac{\mathrm{d}^q}{\mathrm{dx}^q}x^m = \frac{\Gamma(m+1)}{\Gamma(m-q+1)}x^{(m-q)}
When q=12q=\frac{1}{2} & m=2m=2, we have,
B=D12x2=d12dx12x2=Γ(3)Γ(52)x(212)=Γ(3)Γ(52)x(212) \mathrm{B}=\mathrm{D}^{\frac{1}{2}}x^2=\frac{\mathrm{d}^{\frac{1}{2}}}{\mathrm{dx}^{\frac{1}{2}}}x^2 = \frac{\Gamma(3)}{\Gamma(\frac{5}{2})}x^{(2-\frac{1}{2})} =\frac{\Gamma(3)}{\Gamma(\frac{5}{2})}x^{(2-\frac{1}{2})}
From definitions (3)(3) & (4)(4) above, we get,
B=234πx32B=83πx32 B = \frac{2}{\frac{3}{4}\sqrt{\pi}}x^{\frac{3}{2}}\\ \boxed{B = \frac{8}{3\sqrt{\pi}}x^{\frac{3}{2}}}
Again,
C=D1283πx32C=83πD12x32C=83π3π4x C=\mathrm{D}^{\frac{1}{2}}\frac{8}{3\pi}x^\frac{3}{2} \\ C=\frac{8}{3\pi}\mathrm{D}^{\frac{1}{2}}x^\frac{3}{2}\\ \boxed{C=\frac{8}{3\sqrt\pi}\frac{3 \sqrt{\pi}}{4}x}

Plugging A, B and C in equation (6)(6), we get,
y=[yx283πx32]+[83πx32]+[83π3π4x]y=yx2+2x y'= [y-x^2-\frac{8}{3\sqrt\pi}x^\frac{3}{2}] + [\frac{8}{3\sqrt{\pi}}x^{\frac{3}{2}}] + [\frac{8}{3\sqrt\pi}\frac{3 \sqrt{\pi}}{4}x]\\ y'= y-x^2+2x
Let’s simplify this further,
(yx2)+2x=yx2+2x(yx2)=yx2 (y-x^2)'+2x = y-x^2+2x \\ (y-x^2)'=y-x^2
So, the derivative of the function is the function itself, therefore, the only function that satisfies this is exponential function.
yx2=Cex y-x^2=Ce^x
CC is a constant.
y=Cex+x2 y = Ce^x + x^2
Using y(0)=0y(0)=0 to find CC, we get C=0C=0, therefore,
y=x2 \boxed{\boxed{y = x^2}}

Cheers!