I have an expression involving Piecewise that I want to break into specific cases. If I let Mathematica's simplification rules loose then it doesn't seem to pick up an obvious cancellation which can be simplified. There doesn't seem to be a builtin way to do this so I'm left with awkward expression rewriting as the only solution. For the specific case I'm interested, see below (update: text code).

IdxAssump=m ∈ Integers && m>= 0 && n ∈ Integers && n >= 0;

p = Piecewise[{{E^(-α Conjugate[α]) Abs[α]^(-2 m + 2 n) n! Hypergeometric1F1Regularized[-m, 1 - m + n, Abs[α]^2]^2/m!, m < n}}, 
              E^(-α Conjugate[α]) Abs[α]^(2 (m - n)) m! Hypergeometric1F1Regularized[-n, 1 + m - n, Abs[α]^2]^2/ n!]

FullSimplify[p /. {α -> 0}, IdxAssump]



Mathematica output

So the question is, can the automatic merging of conditions be picked apart?

  • 1
    $\begingroup$ Welcome to Mathematica SE. Please take a moment to have a look at the overview here: mathematica.stackexchange.com/help . In order to improve the chances for getting good answers, please post code that can be copy-pasted into Mathematica, as users are not likely to re-type your screenshot. $\endgroup$ – Roman May 7 at 12:00
  • $\begingroup$ Please do not post images of your work, especially when the images display at a size that make them difficult to read. Please post your actual Mathematica code in the form of text that can be copied and pasted into a Mathematica notebook. Without such, it will be difficult to reproduce your problem and to experiment with possible solutions. $\endgroup$ – m_goldberg May 7 at 15:17
  • $\begingroup$ I have updated the question with copyable input text. I found no help on how to make properly formatted output text so I just put an updated image. $\endgroup$ – Austin May 8 at 4:45

Your Answer

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

Browse other questions tagged or ask your own question.