0
$\begingroup$

I have a small problem, I can't get the inverse function. I tried to solve it using InverseFunction, breaking it into parts, but unfortunately it didn’t work. I also tried solving it using Solve. The function itself:

H0 = 140;
B0 = 1.29;
s = 6.3;
\[Beta] = 0.7;
Bm[Hm_] := B0 Hm/H0 (1 + (Abs[Hm/H0])^s)^(-1/(s + \[Beta]));

I got the formula, but it doesn't work:

H0 Bm/B0 ((Bm - 1)^(1/s)/B0)^-(s + \[Beta]);

I ask for your help, thank you.

$\endgroup$
2
  • $\begingroup$ You only need a numerical inverse function? $\endgroup$ Nov 24, 2023 at 7:50
  • $\begingroup$ How accurate do you need the inverse? And what definition range? Your function is essentially linear over a large range. The term in the denominator has a factor of 10^-14. $\endgroup$ Nov 24, 2023 at 8:41

2 Answers 2

2
$\begingroup$

The function is not invertibl algebraically.

      Plot[Bm[Hm], {Hm, 0, 140}]

PlotBm(Hn)

      Assuming[{0.1 < y < 1.2 \.08}, 
         Solve[B0 Hm/H0 (1 + (Abs[Hm/H0])^s)^(-1/(s + \[Beta])) == y, Hm]]

Reduced to the essential variables, the defining equation is $$x^s=\text{B0}^{\frac{1}{\beta +s}} \quad x^{\frac{1}{\beta +s}} \quad y^{\frac{1}{\beta +s}}-1$$

Use numerical Interpolation, that can be trivially inverted by exchange of the axes.

$\endgroup$
1
  • $\begingroup$ thanks for the help. $\endgroup$
    – Vladimir
    Nov 25, 2023 at 7:16
1
$\begingroup$
$Version

(* "13.3.1 for Mac OS X ARM (64-bit) (July 24, 2023)" *)

Clear["Global`*"]

H0 = 140;
B0 = 129/100;
s = 63/10;
β = 7/10;

Bm[Hm_] := B0 Hm/H0 (1 + (Abs[Hm/H0])^s)^(-1/(s + β));

Bm has odd symmetry:

Bm[-Hm] == -Bm[Hm]

(* True *)

invBm[bm_?NumericQ] := Sign[bm]*NSolveValues[
    {Bm[x] == Abs[bm], x >= 0}, x][[1]]

Show[
 ParametricPlot[{Bm[Hm], Hm}, {Hm, -140, 140},
  AxesLabel -> (Style[#, 14] & /@ {Bm, Hm}),
  AspectRatio -> 1],
 Plot[invBm[bm], {bm, -1.2, 1.2},
  PlotStyle -> Directive[Red, Dashed]]]

enter image description here

$\endgroup$
2
  • $\begingroup$ Hello, how can I get the formula in analytical form? $\endgroup$
    – Vladimir
    Nov 24, 2023 at 19:22
  • $\begingroup$ As @RolandF indicated, you can't. $\endgroup$
    – Bob Hanlon
    Nov 24, 2023 at 21:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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