This question already has an answer here:

I have a calculation

expr111 = cs[giso, xiso, 1, 1, 1]

that gives the result

-((k x)/(2 (1 + 1/4 k (x^2 + y^2 + z^2)))) 

I also have two other expressions:

fx = -((k rho^2 x)/(1 + 1/4 k (x^2 + y^2 + z^2))^3)
ff = rho^2/(1 + 1/4 k (x^2 + y^2 + z^2))^2

Pretty obviously expr111 == fx/(2 ff). How do I get Mathematica to make this substitution?


marked as duplicate by m_goldberg, Sjoerd C. de Vries, Nasser, Dr. belisarius, Simon Woods Nov 1 '13 at 14:32

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    $\begingroup$ Related: Can I simplify an expression into form which uses my own definitions? $\endgroup$ – ssch Oct 31 '13 at 19:12
  • $\begingroup$ Are you asking, given your definitions, can you get Mathematica to give fx/ff/2 when you evaluate exp111? That's 180 degrees out of phase with Mathematica normal evaluation rules. $\endgroup$ – m_goldberg Nov 1 '13 at 1:38
  • $\begingroup$ this is also very relevant. It works here but you need to transform your fractions to polynomials first (assuming your denominators are non-zero) $\endgroup$ – gpap Nov 1 '13 at 10:48
  • $\begingroup$ This question appears to be off-topic because it makes no sense when considered in the context of Mathematica's evaluation rules. $\endgroup$ – m_goldberg Nov 1 '13 at 12:31
  • $\begingroup$ @m_goldberg I was imagining a result like Hold[fx/(2 ff)] $\endgroup$ – ssch Nov 1 '13 at 13:16