Superimposing plots

I have a very basic question. Suppose I have two similar looking plots. May be they differ by some over all scaling (e.g, f[x_]:= x^2-x^3 and g[x_]:= 37(x^2-x^3)). But I do not know their functional forms. Is there a way in mathematica to superimpose them to decide whether they are same up to a scaling?

• g[x]/f[x]? Or using Overlay. – Karsten 7. Nov 14 '15 at 20:27
• Oh, so by "plots" you meant "functions"? f[x_] is not a plot, it is a function. A plot is a picture that depicts the function. – Rahul Nov 14 '15 at 22:13

f[x_] := x^2 - x^3
g[x_] := 5 (x^2 - x^3)

Plot[{f[x], g[x], g[x]/f[x]}, {x, -2, 2}, PlotLegends -> "Expressions"] g[x_] := 5 x (x^2 - x^3) • Can I use this method if I have a numerical plot? – Physics Moron Nov 14 '15 at 20:52
• What do you mean with numerical plot? ListPlot ? – eldo Nov 14 '15 at 21:05
• I have a plot which I got solving a differential equation using ParametricNDSolveValue . I want to compare it with another known function. – Physics Moron Nov 14 '15 at 21:21
• Yes, for example pfun = ParametricNDSolveValue[{f''[t] + a f[t] == 0, f == 1, f' == 0}, f, {t, 0, 10}, {a}] and then Plot[pfun[a]/Sin[a], {a, 0, 2}] – eldo Nov 14 '15 at 21:31
• Thanks! So, all one has to check is to see whether f[x]/g[x] is a straight line. That line may not intersect the origin in general. If one gets almost straight line then the curves are very nearly equal. Are these statements correct? – Physics Moron Nov 14 '15 at 21:42