18
$\begingroup$

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

1/2.

How can I return this expression as $4/8$? How can I prevent simplifying rational numbers in lowest terms?

$\endgroup$
9
  • $\begingroup$ Can't u use "4/8"? ;) $\endgroup$
    – Elf
    Commented Dec 30, 2014 at 19:13
  • 2
    $\begingroup$ HoldForm[4/8], and many Examples, if you use the search function on this page. $\endgroup$
    – user9660
    Commented Dec 30, 2014 at 19:14
  • 4
    $\begingroup$ ... or Defer[4/8]. $\endgroup$
    – kglr
    Commented Dec 30, 2014 at 19:14
  • 3
    $\begingroup$ ... or check out Inactivate $\endgroup$ Commented Dec 30, 2014 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
    Commented Dec 30, 2014 at 19:19

1 Answer 1

33
$\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$
1
  • 6
    $\begingroup$ Never seen that before. +1 $\endgroup$
    – Mr.Wizard
    Commented Jan 11, 2015 at 9:49

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.