Saturday, September 14, 2024

HP Prime CAS: Riemann-Louiville Integral vs Taking the Indefinite Integral Twice

HP Prime CAS: Riemann-Louiville Integral vs Taking the Indefinite Integral Twice



Introduction


The Riemann-Louiville Integral takes the integral of the function f(x) of any positive order v. The integral is defined as:


c_D_x^(-v) = 1 / Γ(v) * ∫( (x – t) * f(t) dt, t = c, t = x)


where:

c = a real constant, which can be zero

f(x) = function of x

t = dummy variable of integration

‘v = order where v >0


If v=1, this is the regular integral. However, the value of v can be a positive non-integer. If v=2, then the Riemann-Louiville integral is a result if you integrate the function twice.


This is one of the formulas on determining indefinite integrals of various orders.



HP Prime CAS Function: dblint


Double Integral of f(x) which takes the integral of f(x) twice. The variable x is used in the function.


dblint(f):= ∫∫ f dx dx


HP Prime CAS Function: rlint


The Riemann-Liouville Integral of f(x). The input has the variable x as the independent variable. The result of the function returns t as the independent variable.


rlint(f,c,v):=(∫(t–x)^(v–1)*f,x,c,t)) / Gamma(v)


Note that the variables x and t are switched to allow the input to be a function of x.


Notes


This was programmed on the CAS page in the format:


func(var) := function


I was not able to use the Program Editor mode at time of programming (July 30, 2024). (Beta Firmware 15048)


Examples



Double Integral: dblint

RLI, v = 2: rlint with c = 0

f(x) = x^m, m>0

x^(m+2) / (m^2 + 3*m + 2)

t^(m+2) / (t^2 + 3*t + 2)

f(x) = a*x + b

(a*x^3 + 3*b*x^2) / 6

(a*t^3 + 3*b*t^2) / 6

f(x) = e^x

e^x

-t + e^t – 1

f(x) = cos x

-cos x

-cos t + 1


Taking the derivative twice will return us back to the original function. Note that the indefinite integral function assumes that the added constant is zero ( ∫ f(x) dx = F(x) + C ).



Source


Kimeu, Joseph M., "Fractional Calculus: Definitions and Applications" (2009).Masters Theses & Specialist Projects. Paper 115. http://digitalcommons.wku.edu/theses/115



Eddie


All original content copyright, © 2011-2024. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

Numworks: Allowing Repeated Calculations in Python

Numworks: Allowing Repeated Calculations in Python Introduction Say we want the user to repeat a calculation or a routine for as lo...