3
$\begingroup$

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?

$\endgroup$
3
  • $\begingroup$ This change of variables makes the problem harder rather than easier. Just do the original integral Integrate[2 x E^-x^2, {x, 1, \[Infinity]}] which evaluates to 1/E $\endgroup$
    – Bob Hanlon
    Jan 29 at 6:49
  • $\begingroup$ @Bob Hanlon, You are right. However, why does the transformation not go? $\endgroup$ Jan 29 at 10:08
  • $\begingroup$ @AlexeiBoulbitch - It will evaluate if you include an assumption, e.g., 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$
    – Bob Hanlon
    Jan 29 at 19:40

1 Answer 1

5
$\begingroup$

I 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]

Mathematica graphics

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]

Mathematica graphics

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.

$\endgroup$
4
  • 2
    $\begingroup$ Your result is a negative number -1/E, whereas the original integral is a positive number 1/E. $\endgroup$
    – user64494
    Jan 29 at 17:14
  • $\begingroup$ Submit a bug report to Technical Support. $\endgroup$
    – user64494
    Jan 29 at 17:22
  • 1
    $\begingroup$ Normal will remove the condition from a ConditionalExpression, e.g., sol2 = x /. Last[sol] // Normal $\endgroup$
    – Bob Hanlon
    Jan 29 at 18:40
  • $\begingroup$ @BobHanlon good suggestion,. I did not know that. Will update, thanks. $\endgroup$
    – Nasser
    Jan 29 at 21:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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