File:Gamma property.gif

Summary

Description
English: A linear ramp (1+s(x-1))Gamma(x) for 0<s<1, transforms Gamma(x) to Gamma(x+1)=xGamma(x), which is then returned to Gamma(x) by translation.
Date
Source Own work
Author Ashton Bradley

Julia 1.6 code

using SpecialFunctions, Plots, LaTeXStrings
gr(grid=false,legend=false,size=(600,250),ylims=(-3,3))

## functions
fp(x) = gamma(x) > 0.0 ? gamma(x) : NaN
fn(x) = gamma(x) < 0.0 ? gamma(x) : NaN
g(x,s) = 1+s*(x-1) # linear ramp
gp(x,s) = g(x,s)*fp(x)
gn(x,s) = g(x,s)*fn(x)

## arrays
x = LinRange(-5.01,5.01,999)
svals = LinRange(0,0.999999,400)
xvals = LinRange(0,0.99899,400)
xa=[zero.(svals);xvals]
sa=[svals;svals[end]*one.(xvals)]

## animate
anim = @animate for (xa,sa) in zip(xa,sa)
    plot(x,[gp.(x .-xa,sa),gn.(x .-xa,sa)],line=(:blue,3,0.5))
    plot!(x,[fp.(x .+1),fn.(x .+1)],line=(:green,1,0.4))
    plot!(x,[fp.(x),fn.(x)],line=(:red,1,0.4))
    annotate!(3.7,2.3,L"\Gamma(x)",fontsize=10)
    annotate!(1.5,2.3,L"x\Gamma(x)",fontsize=10)
    xlabel!(L"x")
end every 5 

gif(anim,"gamma.gif",fps=30)

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Category:CC-Zero#Gamma%20property.gifCategory:Self-published work
Category:Animated GIF files Category:Gamma and related functions
Category:Animated GIF files Category:CC-Zero Category:Gamma and related functions Category:Pages using deprecated source tags Category:Self-published work