1
$\begingroup$

Imagine we have a equation like this

 gf= 1 + (a3 - a1 x)^2 w1 + (b3 - b2 x)^2 w2

how can I reach the following equation

 gf2= 1 + a1^2 k1^2  xw1 + (b3 - b2 x)^2 xw2

where

k1 = -(a3/a1 - x)

is it possible to use something like this

1 + (a3 - a1 x)^2 w1 + (b3 - b2 x)^2 w2/.-(a3/a1 - x)->k1

actually I tried and didn't work Thanks

$\endgroup$
  • $\begingroup$ PolynomialQuotient $\endgroup$ – happy fish Apr 30 '16 at 4:55
  • $\begingroup$ It did not work, could you please explain more? $\endgroup$ – amin bk Apr 30 '16 at 5:09
  • $\begingroup$ can you provide an expected output? $\endgroup$ – happy fish Apr 30 '16 at 5:10
  • $\begingroup$ Let me tell you more simple example imagin a1 x1 + a2 y1 + b3 b4 x1 + a2 x1=function then for this function I want to factor a1 x1/a2 the I will get a1 x1/a2( a2 +a2^2 y1/(x1 a1)+... something like this $\endgroup$ – amin bk Apr 30 '16 at 5:12
  • 3
    $\begingroup$ why not use Expand[f/f1]? it gives you the expected output. $\endgroup$ – happy fish Apr 30 '16 at 5:21
2
$\begingroup$
FullSimplify[Eliminate[{gf == 1 + (a3 - a1 x)^2 w1 + (b3 - b2 x)^2 w2, 
   k1 == -(a3/a1 - x)}, {a3}], Assumptions -> a1 != 0]

Mathematica graphics

|improve this answer|||||
$\endgroup$

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.