I am trying to simplify the following expression

$$\frac{\text{C3B} \times \text{R2B} \times s \times \sqrt{\frac{\text{R5B} \times(\text{R1B}+\text{R2B})}{\text{R1B} \times \text{R2B}}}}{\sqrt{\text{C3B} \times \text{C4B}} \times\sqrt{\text{R1B}+\text{R2B}} \times \sqrt{\text{C3B} \times \text{C4B} \times \text{R1B} \times \text{R2B} \times\text{R5B}}}$$

This is supposed to simply simplify to

$$\frac{1}{\text{R1B} \times \text{C4B}} s$$

How can I do it? I think Mathematica is assuming that the variables can be complex or real and negative, but they are real and positive. How can I force Mathematica to do this simplification? Thank you!


Workable code example

components = {"R1", "R2", "C3", "C4", "R5"};
components = StringInsert[components, ToString[ToUpperCase[FromLetterNumber[i]]], -1];
components = ToExpression[components];
Ksymbolic = components[[5]]/components[[1]]*(1 + components[[4]]/components[[3]])^-1;
wpsymbolic = Sqrt[components[[1]] + components[[2]]]/ Sqrt[components[[1]]*components[[2]]*components[[3]]*components[[4]]*components[[5]]];
Qpsymbolic = Sqrt[components[[3]]*components[[4]]]/(components[[3]] + components[[4]])*Sqrt[components[[5]]/components[[1]] + components[[5]]/components[[2]]];
numTSectionSymbolic = Assuming[components > 0, Simplify[Ksymbolic*wpsymbolic/Qpsymbolic*s]];
  • 1
    $\begingroup$ Please post the Mathematica code. $\endgroup$
    – cvgmt
    Commented Jun 20, 2023 at 10:49
  • $\begingroup$ You need assumptions to simplify further: Simplify[ ...,{R1B>0,R2B>0}] $\endgroup$ Commented Jun 20, 2023 at 11:22
  • $\begingroup$ @cvgmt I have posted a workable example code, thank you $\endgroup$ Commented Jun 20, 2023 at 11:44
  • $\begingroup$ @UlrichNeumann yes I am trying to do something like that, but failing. I have posted a workable example. $\endgroup$ Commented Jun 20, 2023 at 11:45
  • 2
    $\begingroup$ Thread[components > 0] $\endgroup$
    – cvgmt
    Commented Jun 20, 2023 at 12:24

2 Answers 2


Mathematica doesn't understand components>0!

Change the last line of your code to

Simplify[Ksymbolic*wpsymbolic/Qpsymbolic*s, Map[# > 0 &, components]]
(*s/(C4B R1B)*) 
  • $\begingroup$ Excellent, thank you! I still struggle from lack of practice on using that "Map" command, but I have seen as a solution to many problems I have faced in the past. $\endgroup$ Commented Jun 20, 2023 at 12:20

You can also do


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.