1
$\begingroup$

I am interested in studying the behavior of the inverse of a linear combination of two functions as the parameter varies. My attempt is in the picture. Since my aim is to use Manipulate, I am trying to keep h (the parameter) explicit in InverseFunction, so that I will be able to make h vary. Unfortunately, when I try to plot the last line, I get an empty graph. How could I solve the problem?

f[x_]=x+2
g[x_]=x^2
h:=0.5
mix[x_]:=h f[x]+(1-h) g[x]

finv[y_]:=InverseFunction[f][y]
ginv[y_]:=InverseFunction[g][y]
mixinv[y_]:=InverseFunction[mix][y]

Plot[mixinv[y], {y, -5, 5}]
Plot[InverseFunction[h f[x] + (1-h) g[x]][y], {y, -5, 5}]
$\endgroup$
1
$\begingroup$

If you want h to be a manipulatable parameter, then make it a variable of your functions.

mix[x_, h_] := h f[x] + (1 - h) g[x]
mixinv[y_, h_] := InverseFunction[mix, 1, 2][y, h]

The syntax for the multi-argument form of InverseFunction says take the inverse with respect to the first argument, out of 2 total arguments.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.