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$ 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$ Commented Dec 30, 2014 at 19:14
  • 4
    $\begingroup$ ... or Defer[4/8]. $\endgroup$ 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$ Commented Dec 30, 2014 at 19:19

1 Answer 1

34
$\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$ Commented Jan 11, 2015 at 9:49

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.