The following script gives not the simplest result. What should be the right command to get the simplest result?

f[x_, y_, a_, b_] := x (a/b)^(y/x b)
g[x_, y_, a_, b_] := Log[f[x, y, a, b]]*x
TraditionalForm[Simplify[g[x, y, a, b]]]

resulting in:

x log(x (a/b)^((b y)/x))

  • 2
    $\begingroup$ Append // PowerExpand // Expand after your result, if the variables and parameters are real valued. the function g[_] is not defined $\endgroup$ – Andreas Feb 22 at 21:48
  • $\begingroup$ your g is f ? with this change, Mathematica does not think x log(x (a/b)^((b y)/x)) is correct result. You can use Reduce to check. $\endgroup$ – Nasser Feb 22 at 21:49
  • $\begingroup$ @Andreas: I have corrected the typo. Your procedure gives $by \log(a)-by \log(a) + ... $ How do I then factor the terms? $\endgroup$ – Hans Feb 23 at 0:05
  • 1
    $\begingroup$ Try: PowerExpand[g[x, y, a, b]] // Simplify // TraditionalForm $\endgroup$ – Daniel Huber Feb 23 at 16:05
  • 1
    $\begingroup$ Append // PowerExpand // Expand // FullSimplify $\endgroup$ – Andreas Feb 23 at 16:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.