We can imagine two functions as energies y=x^3 and y=-x, these are areas under/over graph diminishing themselves. Then let's ask where is this equality compared to the eks factorial. That is everything to do, picture:

https://hrubos.tech/blogy/content/images/20260123220826-teaser-factorial-sol-graph.png
Ah yes, they are asking why zero energy is equal to x!, the problem is those triangles under and over graph as energy aren't perfectly equal. They are overlapping in some areas, but also rising in some areas differently.
using Pkg
# install packages if missing
Pkg.add("SpecialFunctions")
Pkg.add("Plots")
using SpecialFunctions
using Plots
# --- math definitions ---
area_x3(x) = x^4 / 4 # ∫ x^3 dx
area_minus_x(x) = x^2 / 2 # ∫ | -x | dx
total_area(x) = area_x3(x) + area_minus_x(x)
xfactorial(x) = gamma(x + 1) # real factorial via Gamma
# --- domain ---
xs = range(0.1, 6.0, length=5000)
A_vals = total_area.(xs)
F_vals = xfactorial.(xs)
# --- find closest match (numerically) ---
diffs = abs.(A_vals .- F_vals)
idx = argmin(diffs)
x_best = xs[idx]
A_best = A_vals[idx]
F_best = F_vals[idx]
# --- find intersection near x ≈ 5 ---
# we just scan xs > 4.5 to 5.5
xs_near5 = xs[(xs .> 4.5) .& (xs .< 5.5)]
A_near5 = total_area.(xs_near5)
F_near5 = xfactorial.(xs_near5)
diffs_near5 = abs.(A_near5 .- F_near5)
idx5 = argmin(diffs_near5)
x5 = xs_near5[idx5]
A5 = A_near5[idx5]
F5 = F_near5[idx5]
# --- plot ---
p = plot(
xs, A_vals,
label="Total area A(x) = x⁴/4 + x²/2",
linewidth=2,
grid=true
)
plot!(
p,
xs, F_vals,
label="x! = Γ(x+1)",
linewidth=2,
linestyle=:dash
)
# scatter closest match anywhere
scatter!(
p,
[x_best], [A_best],
label="Closest match overall",
markersize=8,
color=:red
)
# scatter intersection near x ≈ 5
scatter!(
p,
[x5], [A5],
label="Intersection near x ≈ 5",
markersize=8,
color=:green
)
# vertical line to emphasize intersection
vline!(p, [x5], linestyle=:dot, color=:green, label="x ≈ 5")
xlabel!("x")
ylabel!("Value")
title!("Comparison of total area and x! (Gamma function)")
display(p)
# --- print numerical results ---
println("Closest match overall:")
println("x ≈ ", x_best)
println("A(x) ≈ ", A_best)
println("x! ≈ ", F_best)
println("|A(x) - x!| ≈ ", abs(A_best - F_best))
println("\nIntersection near x ≈ 5:")
println("x ≈ ", x5)
println("A(x) ≈ ", A5)
println("x! ≈ ", F5)
println("|A(x) - x!| ≈ ", abs(A5 - F5))
println("Press ENTER: ")
readline()
Of course, my wish is an order for the AI. No need to read ebooks how to use julia lang syntax. You just tell er what to spit out ^^^

Comments “Can you solve this via Metamorph? I'm tellin em: Sure! Let's do this: Starting metamorph!”