I want to set a symbol (or variable) for an expression. Here is an example:
A x^2 + C x + D
I want to reduce this expression to
x^2 + G x + D/A
but Mathematica can't do this way
A x^2 + C x + D /. C/A -> G
The above was just an simple example, but my problem is in complex expression like:
(c Kϕ Sin[(i π z)/l])/hw + (c EIw i^4 π^4 Sin[(i π z)/l])/(hw l^4) -
(c i^2 π^2 (-GJ + r0^2 P[z]) Sin[(i π z)/l])/(hw l^2) +
d Dw (6/hw^2 + β μ) Sin[(π z)/λ] + (c i π r0^2 Cos[(i π z)/l] Derivative[1][P][z])/(hw l)
and I want to replace some part like this:
and first expression convert to:
How can I do that?

