# How to solve that kind of partial fraction decomposition equations? [closed]

I need to find all variables $A, B, C, D$ for given equation with independent variable $s$.
How can I solve that with Mathematica ?
Example, not working:

UPDATE:

One

Two

Three

Four

Nothing of listed above gives the result I need.

UPDATE2:

I need denominators below $A,B,C,D$ to be predefined (not what Apart offers). $A,B,C,D$ must be numbers (don't include variable).

-

## migration rejected from math.stackexchange.comMar 11 at 0:56

This question came from our site for people studying math at any level and professionals in related fields. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

## closed as unclear what you're asking by Sjoerd C. de Vries, bobthechemist, rm -rf♦Mar 11 at 0:56

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

Multiply the last expression in FOUR by (5 + s)/(5 + s) and add it the third term. –  Alan Mar 9 at 20:17
Be careful, both C and D have built in meanings. –  Jacob Akkerboom Mar 10 at 9:10
A few of your Solve examples don't obey the correct syntax for Solve. Also don't expect a solution for four variables if you only have two equations. –  Sjoerd C. de Vries Mar 10 at 12:39

## 1 Answer

You could also to match coefficients:

Solve[
Equal @@
PadRight @
{CoefficientList[Numerator[(-s^2 + 40 s + 50)/(s (s + 1) (s + 5)^2)], s],
CoefficientList[Numerator @ Together[a/s + b/(s + 1) + (c*s + d)/(s + 5)^2], s]},
{a, b, c, d}]
(*
{{a -> 2, b -> -(9/16), c -> -(23/16), d -> -(255/16)}}
*)

-