0
$\begingroup$

I' m writing a function with the following line:

f[α_,x_, y_] := f[α,x,y] = 
Assuming[α > 0,Normalize[ E^(-α √(x^2 + y^2)),
Integrate[#,{x,-∞,∞},{y,-∞,∞}]&]];

The output I have is

ConditionalExpression[(E^(-Sqrt[x^2 + y^2] α) α^2)/(
 2 π), Re[α] > 0]

I don' t understand why it does ignore a constraint I gave in the assumptions.

Thanks

$\endgroup$
2
$\begingroup$
Integrate[
 E^(-\[Alpha] \[Sqrt](x^2 + 
       y^2)), {x, -\[Infinity], \[Infinity]}, {y, -\[Infinity], \
\[Infinity]}, Assumptions -> a > 0]

(ConditionalExpression[(2 \[Pi])/\[Alpha]^2, Re[\[Alpha]] > 0])

There is an internal parameter to the notebooks called $Assumption. There is the documentation page for Assumptions for the built-ins Simplify, Refine and Integrate.

And there is Assuming. Assuming is the mightiest of them but seldom in need. As my solution shows the internal option is well suited with the default settings of $Assumption for solving this appropriate.

By default Mathematica assumes that parameters as Complexes.

So the output does take Your assumption in the form of the constrain in the ConditionalExpression: α > 0 -> Re[α] > 0

Mightier is than

Assuming[\[Alpha] > 0 && Element[\[Alpha], Reals], 
  Normalize[E^(-\[Alpha] \[Sqrt](x^2 + y^2)), 
   Integrate[#, {x, -\[Infinity], \[Infinity]}, {y, -\[Infinity], \
\[Infinity]}] &]];

If the intention is to maintain the ConditionalExpression the Normalize has to go outmost and the internal Assumptions have to be used.

Normalize[E^(-\[Alpha] \[Sqrt](x^2 + y^2)), 
 Integrate[#, {x, -\[Infinity], \[Infinity]}, {y, -\[Infinity], \
\[Infinity]}, Assumptions -> \[Alpha] > 0] &]

(* ConditionalExpression[(E^(-Sqrt[x^2 + y^2] [Alpha]) [Alpha]^2)/( 2 [Pi]), Re[[Alpha]] > 0] *)

Normalize[E^(-\[Alpha] \[Sqrt](x^2 + y^2)), 
 Integrate[#, {x, -\[Infinity], \[Infinity]}, {y, -\[Infinity], \
\[Infinity]}] &]

(* ConditionalExpression[(E^(-Sqrt[x^2 + y^2] [Alpha]) [Alpha]^2)/( 2 [Pi]), Re[[Alpha]] > 0] *)

Excuse. The concept is either the assumption is given or computized by internals. Now flaw, no error, nothing forgotten.

Normalize[E^(-\[Alpha] \[Sqrt](x^2 + y^2)), 
 Integrate[#, {x, -\[Infinity], \[Infinity]}, {y, -\[Infinity], \
\[Infinity]}, 
  Assumptions -> (\[Alpha] > 0 && Element[\[Alpha], Reals]) &]]

E^(-Sqrt[x^2 + 
   y^2] \[Alpha])/(Assumptions -> \[Alpha] > 
      0 && (\[Alpha] \[Element] Reals) & (\!\(
\*SubsuperscriptBox[\(\[Integral]\), \(-\[Infinity]\), \
\(\[Infinity]\)]\(
\*SubsuperscriptBox[\(\[Integral]\), \(-\[Infinity]\), \
\(\[Infinity]\)]1 \[DifferentialD]y \[DifferentialD]x\)\)) \
#1)[E^(-Sqrt[x^2 + y^2] \[Alpha])]

enter image description here

Which is not nicely evaluable. With Rules this works.

$\endgroup$
1
  • $\begingroup$ Thanks for the explaination...it is not too clear right now, but I will get it in some time. There is a mistake in you first and last code because in assumptions you use a in place of $\alpha$ $\endgroup$ – SoterX Oct 12 '20 at 8:07

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.