13
$\begingroup$

I have a question about the concept of simplification. I want to explain it with an example. When I write $4/8$ in mathematica, output is

1/2.

How can I return this expression to $4/8$? How can I prevent simplifying this expression?

$\endgroup$
  • $\begingroup$ Can't u use "4/8"? ;) $\endgroup$ – Elf Dec 30 '14 at 19:13
  • 2
    $\begingroup$ HoldForm[4/8], and many Examples, if you use the search function on this page. $\endgroup$ – user9660 Dec 30 '14 at 19:14
  • 4
    $\begingroup$ ... or Defer[4/8]. $\endgroup$ – kglr Dec 30 '14 at 19:14
  • 3
    $\begingroup$ ... or check out Inactivate $\endgroup$ – Jacob Akkerboom Dec 30 '14 at 19:18
  • $\begingroup$ Thank you for your comments. Since i am a new user of mathematica, i dont know the functions very well. the functions Defer and HoldForm is ok for me. Best regards... $\endgroup$ – MATIRMAK Dec 30 '14 at 19:19
23
$\begingroup$

You can use the internal function Internal`RationalNoReduce

Internal`RationalNoReduce[4, 8]

enter image description here

Internal`RationalNoReduce[4, 8]^2 + 5

enter image description here

$\endgroup$
  • 2
    $\begingroup$ Never seen that before. +1 $\endgroup$ – Mr.Wizard Jan 11 '15 at 9:49

Your Answer

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

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