I'm trying the following Mathematica command to simplify an expression by substitution of a known constant, but it's not performing the substitution. Any ideas why?

FullSimplify[((krRA + aRA) (kfRL L aRL + aR (krRL + aRL)))/(kfRA aRA (krRL + aRL)), Assumptions -> kmL == (aR (krRL + aRL))/(kfRL aRL), Assumptions -> {kfRL > 0, aRL > 0, kfRL aRL > 0}]

write your equation like this with assumption

eq = FullSimplify[((krRA + aRA) (kfRL L aRL + 
aR (krRL + aRL)))/(kfRA aRA (krRL + aRL)), 
Assumptions -> {kfRL > 0, aRL > 0, kfRL aRL > 0}]

enter image description here

Solve you substitution with respect to a variable available in the eq! let's choose aR to represent equation with respect to them so we substitute them in first equation eq.

sub = Solve[kmL == (aR (krRL + aRL))/(kfRL aRL), aR] // 
Flatten /. Rule -> Equal

enter image description here

use replacement or substitution as follow to get your simplified expression

eq /. sub

enter image description here

  • $\begingroup$ Thanks! I'm aware of this technique of using replacement rules to perform substitutions. But I'm wondering why the method of using the Simplify command to do this doesn't work. According to the documentation, the Simplify command should be able to perform the substitution. $\endgroup$ – Abed Alnaif Apr 17 at 16:58
  • $\begingroup$ @AbedAlnaif I suspect the reason your method does not work with Simplify is that you are expecting Simplify to replace something small and simple with something larger and more complicated. I suspect if you used your same Simplify method in reverse and gave it the larger and more complicated expression with your assumption that it would happily replace the larger expression with kfRL That is because it is trying to find the smallest and simplest form of the result. Does that seem understandable? $\endgroup$ – Bill Apr 17 at 18:46

Your Answer

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

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