Group Abstract Group Abstract

Message Boards Message Boards

0
|
56 Views
|
6 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Separating variables *a* and *b* in a transcendental equation

Posted 1 day ago
eq1 = 2 (a + b) == E^(2 a) + 2 Log[b] + 1

How to transform eq1 into the form of eq2:

eq2 = E^(2 a) - 2 a + 1 == 2 b - 2 Log[b]

The transformation rule is to move terms containing the same variable to the same side of the equation. Specifically for this problem, terms with the letter 'a' should be moved to one side, while terms with 'b' should be moved to the other side.

POSTED BY: Wen Dao
6 Replies

Here is a way using SubtractSides:

eq1 = 2 (a + b) == E^(2 a) + 2 Log[b] + 1 // Expand
SubtractSides[eq1,
 Select[eq1[[1]], FreeQ[a]] +
  Select[eq1[[2]], FreeQ[b]]]
POSTED BY: Gianluca Gorni
Posted 5 hours ago

Thanks for your assistance; the issue is now solved.

POSTED BY: Wen Dao

Assuming Expand[] will separate terms as it does in eq1:

eq1 = 2 (a + b) == E^(2 a) + 2 Log[b] + 1;
GatherBy[List @@ Expand[Subtract @@ eq1], FreeQ[b]] //
 Replace[{{lhs_, rhs_} :> Plus @@ lhs == -Plus @@ rhs,
   {oneside_} :> oneside == 0}]

(*  -1 + 2 a - E^(2 a) == -2 b + 2 Log[b]  *)
POSTED BY: Michael Rogers
Posted 5 hours ago

Perfect! thanks to your approach—the issue is now resolved.

POSTED BY: Wen Dao
Posted 5 hours ago

Okay, these two functions are useful for transposing the equation.

POSTED BY: Wen Dao
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard