Quantcast
Channel: Trouble finding inverse of a function - Mathematica Stack Exchange
Viewing all articles
Browse latest Browse all 2

Answer by Daniel Huber for Trouble finding inverse of a function

$
0
0

Look at your data:

ListLinePlot[UsvsL, AxesLabel -> {"U", "L"}]

![enter image description here

Note that for some Ls there two Us. Therefore the inverse function is not single valued. We therefore create two inverse functions, One with the data from U= 1.01 .. 1.21 and a second one with data from U= 1.21 .. 2.01.

dat1 = Select[UsvsL, #[[1]] <= 1.21 &];dat2 = Select[UsvsL, #[[1]] >= 1.21 &];

Now, how to create the inverse funtions? We already have a table of L[Us]. If we reverse the table entries, we have a table Us[L], but maybe not for the requested L. Toward this aim, we can calculate an interpolating function.

intpol1 = Interpolation[Reverse /@ dat1]intpol2 = Interpolation[Reverse /@ dat2]

enter image description here

With this two functions you may get the Us for given Ls:

Plot[intpol1[l], {l, Min[dat1[[All, 2]]], Max[dat1[[All, 2]]]},  AxesLabel -> {"L", "U"}]Plot[intpol2[l], {l, Min[dat2[[All, 2]]], Max[dat2[[All, 2]]]},  AxesLabel -> {"L", "U"}]

enter image description here


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>