Result =
Hi Majid,
Please note that; with the given values, the result of adding A and B should be -
(3*S) + 5/( S^2+4*S+3)
Assuming that is the desired result, you can use the "collect" function to simplify the equation.
syms S;
A=1/(S+1);
B=2/(S+3);
Result=A+B
Result = simplify(Result)
Result = collect(Result, S)
Refer to the following MathWorks documentation for more details on "collect" function: