2
$\begingroup$

I have the following function: $$ y(x)=\frac{Ax}{Bx^{1/4}\sinh{(\frac{Bx^{1/4}}{2})}}\left(\cosh{(\frac{Bx^{1/4}}{2})}-1 \right), $$ where $A=112.941$ and $B=18.6588$. I want to find the differential of the inverse function: $$ x'(y)=\frac{dx}{dy}. $$ Since the function is transcendental, I cannot simply invert the function and find an explicit expression for $x(y)$. So I used implicit differentiation in Mathematica, like so:

D[y - ((A*x[y])/(B*(x[y])^(1/4)*Sinh[B*(x[y])^(1/4)/2]))*(Cosh[
  B*(x[y])^(1/4)/2] - 1), y],

and solved for $x'(y)$. FullSimplify gives

(16 B Cosh[1/4 B x[y]^(1/4)]^2 x[y]^(1/4))/(
6 A Sinh[1/2 B x[y]^(1/4)] + A B x[y]^(1/4)),

which is a plottable function.

It has been a while since I last dealt with inverse functions and there is no easy way to heuristically varify the result. Is this approach correct at all? A confirmation from fellow Mathematica users would be greatly appreciated.

P.S.: I am sorry if this is the wrong stackexchange for this question, but others seemed even less fitting. Thank you for your time and have a great weekend!

$\endgroup$
4
  • 1
    $\begingroup$ "easy way to heuristically verify" - plot the function, and plot lines with slopes computed from the purported derivative formula. If the lines don't look like tangents, something went wrong. $\endgroup$ Commented Jul 17, 2015 at 16:13
  • 1
    $\begingroup$ Are the arguments of $\cosh$ and $\sinh$ supposed to be proportional to $x$ or $x^{1/4}$? You have them one way in your equation at the top and a different way in your code. $\endgroup$ Commented Jul 17, 2015 at 16:30
  • $\begingroup$ Michael Seifert, yes, you are correct. The $1/4$ power must be in the arguments. I will correct the latex code. $\endgroup$
    – drabus
    Commented Jul 17, 2015 at 16:35
  • $\begingroup$ Did one of the answers below answer your question? If so, please accept one! $\endgroup$
    – march
    Commented Aug 20, 2015 at 2:02

2 Answers 2

5
$\begingroup$

Implementing the suggestion of J. M. in the comments: if the derivative of the inverse function is given by a function $x'(x)$, then the slope of the tangent line to the graph at $(x_0, y(x_0))$ will be given by $1/x'(x_0)$, and the line through the point $(x_0, y(x_0))$ will be $$ y = \frac{x - x_0}{x'(x_0)} + y(x_0). $$ Implementing:

a = 112.941;
b = 18.6588;
y[x_] = a x (Cosh[b x^(1/4) /2] - 1)/(b x^(1/4) Sinh[b x^(1/4) /2]);
graph = Plot[y[x], {x, 0, 0.5}];
xpr[x_] = (16 b Cosh[1/4 b x^(1/4)]^2 x^(1/4))/(6 a Sinh[1/2 b x^(1/4)] + a b x^(1/4));
tangentline[x0_] := Plot[(x - x0)/xpr[x0] + y[x0], {x, 0, 0.5}, PlotStyle -> Red]
Manipulate[Show[graph, tangentline[x0], Graphics[{PointSize[Medium], Black, Point[{x0, y[x0]}]}]], {x0, 0.001, 0.5}]

enter image description here

Looks good to me.

$\endgroup$
4
  • 1
    $\begingroup$ $x^\prime(x)$ just looks… perverse. $\endgroup$ Commented Jul 17, 2015 at 16:56
  • 1
    $\begingroup$ @J. M.: As a physicist, convenient abuses of notation are my stock-in-trade. $\endgroup$ Commented Jul 20, 2015 at 13:00
  • 1
    $\begingroup$ @J M. On the other hand, as a theoretical physicist, I would avoid this particular abuse of notation like the plague. $\endgroup$
    – march
    Commented Jul 21, 2015 at 1:09
  • 1
    $\begingroup$ Sorry Michael, gonna have to side with @march here. (P.S. I'm a chemist.) $\endgroup$ Commented Jul 21, 2015 at 2:11
3
$\begingroup$

Alternatively, we could check to see if the derivative of the inverse is the reciprocal of the derivative of the original function. This will work nicely as long as your functions have neither vertical nor horizontal asymptotes.

a = 112.941;
b = 18.6588;
f[x_] = a x (Cosh[b x^(1/4)/2] - 1)/(b x^(1/4) Sinh[b x^(1/4)/2]);
fD[x_] = D[f[x], x];
fInverseD[x_] = (16 b Cosh[1/4 b x^(1/4)]^2 x^(1/4))/(6 a Sinh[1/2 b x^(1/4)] + a b x^(1/4));
Plot[1/fD[x] - fInverseD[x], {x, -1, 1}]

results in

enter image description here

That's zero.

$\endgroup$
2
  • $\begingroup$ "we could check to see if the derivative of the inverse is the reciprocal of the derivative of the original function"... Is there a rule for that? $\endgroup$
    – drabus
    Commented Jul 19, 2015 at 12:04
  • 1
    $\begingroup$ @drabus. Sure! en.m.wikipedia.org/wiki/Inverse_functions_and_differentiation $\endgroup$
    – march
    Commented Jul 19, 2015 at 13:09

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.