2
$\begingroup$

Sorry, I am a beginner of Mathematica, try to plot a function, my short code is as follow, but the pic is blank. I could not find what is wrong in my code. Thanks a lot!

f[x_] := x + 2^0.5*x^1.5
g[x_] := InverseFunction[Composition[f, f]][x]
k[x_] := x^0.5*g'[x]/g[1]
Plot[k[x], {x, 0, 1}]
$\endgroup$
  • $\begingroup$ replace g (1) with g[1] in line 3 of your code. $\endgroup$ – kglr Jan 17 '18 at 15:12
2
$\begingroup$
f[x_] = x + 2^(1/2)*x^(3/2);

g[x_] := InverseFunction[Composition[f, f]][x]
k[x_] := x^(1/2)*g'[x]/g[1]

Plot[Evaluate@k[x], {x, 0, 1}, WorkingPrecision -> 15]

enter image description here

$\endgroup$
0
$\begingroup$

Thanks for your help @Bob Hanlon. Sorry I could not make comments due to my low reputation. I try to iterate f[x] 4 times, my code is as follow, but encounter three problems:

  1. the picture of this function goes below 0, it becomes partially negative, which is impossible since g[x] is increasing function.

  2. the picture of k[x] is not 0 when x closes to 0, but it is obvious that k[0]=0

  3. If I change the number slightly, just like below, the pic I plot is still blank

    f[x_] = x + 2^(1/3)*x^(4/3);

    g[x_] := InverseFunction[Composition[f, f, f, f]][x]

    k[x_] := x^(1/3)*g'[x]/g[1]

    Plot[Evaluate@k[x], {x, 0, 1}, WorkingPrecision -> 100]

$\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.