TransWikia.com

How to ask Mathematica to simplify an expression in terms of a particular variable?

Mathematica Asked by Zubin on August 15, 2021

With the following matrix where there are relations between different variables a,b,c,d, how can I instruct Mathematica to yield the answer only in terms of variables a and X

    d/(2 b) == X; (b + c)/(2b) == X; (e - b)/(2b) == X;

mat = FullSimplify[{{a - I ((b + c)/2), d}, {d, a - I ((e - b)/2)}}]

One Answer

ClearAll["Global`*"]

Since there are only three equations for the relations, you can only eliminate three variables. In addition to a and X, e will also remain.

repl = Solve[{d/(2 b) == X, (b + c)/(2 b) == X, (e - b)/(2 b) == X},
   {b, c, d}][[1]]

(* {b -> e/(1 + 2 X), c -> (e (-1 + 2 X))/(1 + 2 X), d -> (2 e X)/(1 + 2 X)} *)

mat = {{a - I ((b + c)/2), d}, {d, a - I ((e - b)/2)}} /. repl // Simplify

(* {{(a + 2 a X - I e X)/(1 + 2 X), (2 e X)/(1 + 2 X)}, {(2 e X)/(1 + 2 X), 
  (a + 2 a X - I e X)/(1 + 2 X)}} *)

Answered by Bob Hanlon on August 15, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP