1
$\begingroup$

I have got the following output and I would like to get rid of all those high values and obtain a better looking result. FulLSimplify doesn't work for this task. Do you know how to get a better looking output without all those 10^48 etc?

 (6.60881*10^48 beta)/(
 6.97402*10^50 Z0^2 + beta^2 (1.70645*10^47 - 8.3024*10^46 Z0^2))

For instance, I would like Z0 to appear only once.

$\endgroup$

2 Answers 2

3
$\begingroup$

A simple workaround:

exp=(6.60881*10^48 beta)/(6.97402*10^50 Z0^2 + beta^2 (1.70645*10^47 - 8.3024*10^46 Z0^2));

(Numerator[exp]/exp[[1]])/Collect[Simplify[Denominator[exp]/exp[[1]]], Z0]
(* (1. beta)/(0.0258208 beta^2 + (105.526 - 0.0125626 beta^2) Z0^2) *)
$\endgroup$
1
  • $\begingroup$ what about removing all those huge numbers and letting mathematica simplify them? $\endgroup$
    – Andrea G
    Apr 18, 2017 at 10:16
0
$\begingroup$

Here is another way to do this:

In[347]:= ReduceAndCollect[eqn_, var_] :=
 Module[{redeqn},
  redeqn = 1/Together[Simplify[1/eqn]];
  Collect[Numerator[redeqn], var]/Collect[Denominator[redeqn], var]
 ]

In[349]:= eqn = (6.60881*10^48 beta)/(6.97402*10^50 Z0^2 + beta^2 (1.70645*10^47 - 8.3024*10^46 Z0^2));

In[350]:= ReduceAndCollect[eqn, Z0]
Out[350]= -((79.6012 beta)/(-2.05537 beta^2 + (-8400. + 1. beta^2) Z0^2))
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.