1

If we had an equation of the form

$f(r)+g(\theta)+\theta^2+c+2r+k(\theta)+10=0$

Is there a way to move the terms containing $r$ to one side and the terms containing $\theta$ to other side like this

$f(r)+c+2r+10=-g(\theta)-\theta^2-k(\theta)$

Thanks.

user3741635
  • 111
  • 2

1 Answers1

5

One possible way (used $x$ for $\theta$ as easier to type)

ClearAll[f, r, g, x, c, k];
eq = f[r] + g[x] + x^2 + c + 2 r + k[x] + 10 == 0

Mathematica graphics

eq = eq /. (stuff_) == 0 :> stuff;
eq = List @@ eq;
lhs = Pick[eq, Not@FreeQ[#, r] & /@ eq];
rhs = Complement[eq, lhs];
eq = Plus @@ lhs == -(Plus @@ rhs)

Mathematica graphics

Nasser
  • 143,286
  • 11
  • 154
  • 359