I have the equation:
$y = a b^x \times \sin^2(\pi x)$
I am only interested in the output between x=0 and x=1. I would like the curve to peak at y=1 in this range by automatically scaling "a" to accomplish this based on any given setting for "b".
That way it will look similar to:
$y = \sin^2(\pi x^c)$
Both equations are graphed here showing approximately what I mean:
https://www.desmos.com/calculator/e4glcythvs
Any suggestion for how I can write $a$ in the first equation to accomplish this for varying levels of $b$?
You may find the extrema $x_e$ of $f(x) = b^x \sin^2(\pi x)$: $$ \partial_x b^x \sin^2(\pi x) = b^x\sin(\pi x)(\ln(b)\sin(\pi x)+2\pi\cos(\pi x)) \Rightarrow x_e = \text{arccot}(-\tfrac{\ln(b)}{2\pi})\tfrac{1}{\pi} $$ and then just set $a = f(x_e)^{-1}$, i.e. $$f(x)\to \frac{1}{b^{x_e}\sin^2(\pi x_e)}b^x \sin^2(\pi x)$$