Translate Quadratic so that $x^4-x^2 = 0$

69 Views Asked by At

I need to math for a button bounce with jquery, and the simplest and cleanest way to do that is figure out the equation from 0 to 1.

The equation is in the form of $x^4 - x^2 + 0$ and needs to equal $1$ at $x=0$

Such that the equation

$ -\dfrac{(x^4)}{32 }+ \dfrac{(20x^2)}{32}$

is 1 at x=0, and decreases to 0 at x=1

Normally the equation is equal to 0 when x=5. I just need to translate it along the x-axis so that it's 0 at x=1

2

There are 2 best solutions below

1
On

For any function $f(x)$, we can define the "translated right by $k$" version of it as: $$\text{translate}_k(x) = f(x-k)$$ We can see this is the right definition by trying out some values: \begin{align*} \text{translate}_k(0) & = f(-k) \\ \text{translate}_k(k) & = f(0) \\ \text{translate}_k(k+1) &= f(1) \end{align*} It sounds like you have some $f(x)$ such that $f(5) = 0$, and you want to translate this so that $f(1) = 0$ (so left by 4). Then, we'd want to use: $$\text{translate}_{-4}(x) = f(x+4)$$ This gives the equation: $$-\frac{(x+4)^4}{32}+\frac{20}{32}(x+4)^2$$

0
On

You need a horizontal shift to do the transformation for you. Change $x$ to $x+4$ and you are done. For example if you have $(x-5)^2=0$, change it to $(x+4-5)^=0$ which simplifies to $(x-1)^2=0.$