1
$\begingroup$

In order to obtain the partial fractions of an expression, I used the function Apart to realize it. However the result is shown as Figure 1 which isn't what I want. The result I want is shown in Figure 2. There are three difference between them: 1)there are as few terms in the numerator as possible, 2)the partial fractions are as few as possible, 3)don't appear a negative sign before the first item in parentheses. How to do it? Thanks.

Code

Apart[-((1 + t)/(2 (-1 + t) (-1 + s t)))]

Figure 1

enter image description here

Figure 2

enter image description here

$\endgroup$
1
  • $\begingroup$ If t is the variable of interest, then Fig 2 is not a PFD for that expression. If s is the variable then the original expression is already in PFD form. $\endgroup$ Commented Aug 6, 2021 at 15:05

1 Answer 1

1
$\begingroup$
Clear["Global`*"]

expr = -((1 + t)/(2 (-1 + t) (-1 + s t)));

Multiply then divide by (1 - s t), i.e., multiply by 1

expr2 = (#/(1 - s t) & /@ ((1 - s t) expr // Simplify // Apart)) /. 
  a_/(t - 1) :> -a/(1 - t)

(* 1/(2 (1 - s t)) - 1/((1 - t) (1 - s t)) *)

Verifying the equivalence of the expressions

expr == expr2 // Simplify

(* True *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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