# Plotting a function rescaled by a parameter along x axis

I would like to know, how to plot a graph, for example of this function:

$$f(t)=-\frac{4 \sin \left(\frac{\gamma t}{2}\right)}{\gamma ^2 t}-\frac{4 \sin ^2\left(\frac{\gamma t}{4}\right)}{\gamma }-\frac{2 \cos \left(\frac{\gamma t}{2}\right)}{\gamma }+\frac{\pi t}{2}$$ where $$t$$ is a variable and $$\gamma$$ is some constant parameter. Is there a possibility to plot it with x axis being in units of notjust $$t$$, but in units of $$\gamma t$$?

I was thinking it could be done something like this, but it does not work:

Plot[f(t), {\[Gamma]*t, 0, 40}]

• Would ParametricPlot[{\[Gamma]*t, f[t]}, {t, 0, 40}] do what you want? May 20, 2020 at 0:30
• It kinda seems to work, but for \Gamma values less than 1 it gives seemingly correct, but really weird scaled plot. Thanks! Seems, that @Vitaliy Kaurov answer works as well! May 20, 2020 at 6:20
• Welcome to the forum. Thanks for accepting the answer. You should give it an upvote too if you fin dit useful :-) please see the intro for newcomers. May 20, 2020 at 12:12

This is your function:

f[g_,t_]:=-4Sin[g t/2]/g^2/t-4Sin[g t/4]^2/g-2Cos[g t/2]/g+Pi t/2


With transformed variable $$z=g*t$$ you get a new function:

h[g_,z_]=f[g,t]/.t->z/g


$$\frac{\pi z}{2 g}-\frac{4 \sin ^2\left(\frac{z}{4}\right)}{g}-\frac{4 \sin \left(\frac{z}{2}\right)}{g z}-\frac{2 \cos \left(\frac{z}{2}\right)}{g}$$

which you plot (with, for example, $$g=1$$) as

Plot[h[1, z], {z, 0, 10}]