Community RSS Feed
http://community.wolfram.com
RSS Feed for Wolfram Community showing any discussions in tag Calculus sorted by active[✓] Obtain inverse of a function?
http://community.wolfram.com/groups/-/m/t/1202155
I'm quite new to Mathematica and have so far been unable to resolve the following (minor) technical issue. In principle, the task is very straightforward: I'd like to define the inverse of the function F(x) = 1 - x^2/(2cosh(x)-2) *for x >= 0*, but because F is not a 1-1 function on the reals, I often get answers with the wrong sign if I set:
g[x_] = InverseFunction[F][x]
I need to compose g with another function, so it's not enough to just reflect the plot of F in the line y=x.
The easy fix I've found is just to let
g[x_] = Abs[InverseFunction[F][x]]
but this feels like a bit of a cheat, and on my machine, it takes quite a long time to generate a plot (it is possible to speed up this process?)
Instead, I've been trying to define g as a function with a restricted domain using ConditionalExpression, as in the example at
http://reference.wolfram.com/language/ref/InverseFunction.html
I must be doing something wrong, because I don't get any plot whatsoever!
Any help would be much appreciatedOliver Feng2017-10-12T15:52:55ZUse NIntegrate with vectors?
http://community.wolfram.com/groups/-/m/t/1202204
Is there a way to get Mathematica to provide a meaningful answer - perhaps semi-numerically - for the following numerical integral over vectors? Note that it is OK to assume a value for \Alpha. Additionally the vector $\vec{x}$ is not being integrated over. So, if absolutely essential, different values of $\vec{x}$ could be taken for the numerical integration.
$Assumptions = Element[p1v | p3v | p4v | p5v | xv, Vectors[3, Reals]];
a = Simplify[ReleaseHold[Hold[E^((-I)*p1v . xv)]]]
b = Simplify[ReleaseHold[Hold[(p1v . p1v + p3v . p3v)/
((p3v - p1v)*(p3v - p1v)*(\[Alpha]^2*p3v . p3v + 1)^2)]]]
jj = FullSimplify[a*b]
Now, the following symbolic integral doesn't seem to work, i.e. Mathematica just spits back the input
Integrate[(p1v . p1v + p3v . p3v)/(E^(I*p1v . xv)*
((p1v - p3v)^2*(1 + \[Alpha]^2*p3v . p3v)^2)),
{p1v, -Infinity, Infinity}, {p3v, -Infinity, Infinity}]
but neither do the following NIntegrate commands work
NIntegrate[(p1v . p1v + p3v . p3v)/(E^(I*p1v . xv)*
((p1v - p3v)^2*(1 + p3v . p3v)^2)), {p1v, 0, 1}, {p3v, 0, 1},
{xv, 0, 1}]
NIntegrate::inumr: The integrand (E^(-I p1v.xv) (p1v.p1v+p3v.p3v))/((p1v-p3v)^2 (1+p3v.p3v)^2) has evaluated to non-numerical values for all sampling points in the region with boundaries {{0,1},{0,1},{0,1}}.
Note that above, \Alpha was taken to be zero, and a simultaneous integration over $\vec{x}$ was attempted, if Mathematica can't do any kind of semi-numerical integration.
The following NIntegrate doesn't work either - probably because I don't know how to make Mathematica perform a numerical integration with an algebraic parameter.
NIntegrate[(p1v . p1v + p3v . p3v)/(E^(I*p1v . xv)*
((p1v - p3v)^2*(1 + p3v . p3v)^2)), {p1v, 0, 1}, {p3v, 0, 1}]
NIntegrate::inumr: The integrand (E^(-I p1v.xv) (p1v.p1v+p3v.p3v))/((p1v-p3v)^2 (1+p3v.p3v)^2) has evaluated to non-numerical values for all sampling points in the region with boundaries {{0,1},{0,1}}.
If there is a way to conclusively know before integration whether the integrals are non-convergent, that would be very helpful, but that's also unknown to me how to do that in Mathematica.Arny Toynbee2017-10-12T16:51:05Z