1
$\begingroup$
$Assumptions = (a > 0 && m > 0 && h > 0 && t \[Element] Reals && A \[Element] Reals); \[CapitalPsi][x_, t_] := A Exp[-a m x^2/h - a I t] Solve[Integrate[Abs[\[CapitalPsi][x, t]]^2, {x, -Infinity, Infinity}] == 1, A] Select[%, Simplify[(A /. #) > 0] &][[1]] 

This will give the expected result

{A -> ((a m)/h)^(1/4) (2/\[Pi])^(1/4)} 

But my initial attempt by using A>0 in $Assumptions instead of A \[Element] Reals or adding it in Solve

$Assumptions = (a > 0 && m > 0 && h > 0 && t \[Element] Reals && A > 0); 

will return

Root[-2 a m + h \[Pi] #1^4 &, 2] 

Applying ToRadicals gives

-((a^(1/4) m^(1/4) (2/\[Pi])^(1/4))/h^(1/4)) 

It looks incorrect to me. Is there anyone who can explain it and maybe offer a better way to pick up the positive solution?

$\endgroup$
4
  • $\begingroup$ The same problem for simpler example: Assuming[A > 0 && b > 0, Solve[A^2 Sqrt[b] == 1, A]]. $\endgroup$ Commented yesterday
  • $\begingroup$ That's why since version 12.2, I have been usingSetOptions[Solve,Assumptions->None]. Prior to 12.2, Solve did not take assumptions and it worked much better. $\endgroup$ Commented yesterday
  • 1
    $\begingroup$ You can use Simplify with assumptions to better control the result you get after Solve. $\endgroup$ Commented yesterday
  • 3
    $\begingroup$ Parametrized roots are tricky, both with Root[] and with radicals. Branches come together and split, sometimes changing between real and complex, as the parameter values change. To take @A.Kato's example: foo = Assuming[A>0 && b>0, Solve[A^2 Sqrt[b]==1, A]]; murf = foo // ToRadicals; ReImPlot[A /. Join[foo, murf] // Evaluate, {b, -2, 2}, PlotStyle -> {Automatic,Dashed}]: The Root[] and the radical initially agree but change when b == 0. Radicals and Roots are not equivalent. Radical expressions do not keep the order that Root[..., k] does. ToRadicals[] does not use assumptions. $\endgroup$ Commented 21 hours ago

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.