How do I perform the following variable change:
IntegrateChangeVariables[Inactive[Integrate][2x E^-x^2,{x,1,\[Infinity]}],u,u==E^-x^2]
Returns unevaluated. Am I missing some condition?
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this communityI think it is because you have two branches and it does not know which one to use
sol=Solve[u == Exp[-x^2], x, Reals]
When you pick the right one, then it works
sol2 = x /. Last[sol] // Normal (*to remove conditional part*)
IntegrateChangeVariables[Inactive[Integrate][2 x E^-x^2, {x, 1, ∞}], u, x == sol2]
Update
The issue of sign wrong is known and was asked to be reported it before on similar problem with sign.
IntegrateChangeVariables producing incorrect result
(I just noticed it is same OP who asked this question as the above linked to question).
Also note that this function is marked as EXPERIMENTAL so bugs are to be expected? It is better not to use EXPERIMENTAL functions for production code.
-1/E
, whereas the original integral is a positive number 1/E
.
$\endgroup$
Jan 29 at 17:14
Normal
will remove the condition from a ConditionalExpression
, e.g., sol2 = x /. Last[sol] // Normal
$\endgroup$
Jan 29 at 18:40
Integrate[2 x E^-x^2, {x, 1, \[Infinity]}]
which evaluates to1/E
$\endgroup$Assuming[x >= 1, IntegrateChangeVariables[ Inactive[Integrate][2 x E^-x^2, {x, 1, \[Infinity]}], u, u == E^-x^2]]
However, as with @Nasser answer, the sign of the result is wrong. $\endgroup$