1
$\begingroup$

I think I'm having a bit of a senior moment or something... I was evaluating $\pi/2/\pi^2$. My instinct was that the answer would be $\frac{\pi^3}2$ from $\frac{\pi}1 * \frac{\pi^2}2$ but I checked wolfram and got $\frac{1}{2\pi}$.

I'm pretty sure I understand how wolfram evaluated and got that result, but now I have the questions: which is correct, and why?

Symbolab gave me the answer I first assumed: $\frac{\pi^3}2$ with the same input as wolfram and I'm pretty sure they can't both be correct.

The links to the equations I've used are:

https://www.symbolab.com/solver/step-by-step/%5Cfrac%7Bpi%7D%7B%5Cfrac%7B2%7D%7Bpi%5E%7B2%7D%7D%7D

https://www.wolframalpha.com/input/?i=pi%2F2%2Fpi%5E2

The question I was trying to solve when I came across this was $\int_{1/2}^1 x \cos(\pi x) dx$

Thanks for your assistance!

edit: Thanks for the replies so far, I think what I'm trying to get a feel for is how to know around which terms I should use brackets when I see this type of fraction.

$\endgroup$
  • $\begingroup$ Moral lesson: when in doubt, use parentheses. $\endgroup$ – J. M. is a poor mathematician Dec 28 '16 at 16:05
  • $\begingroup$ $/$ is not an associative operation. $$\frac{\pi}{\frac{2}{\pi^2}}=\frac{\pi^3}{2}\neq \frac{1}{2\pi} =\frac{\frac{\pi}{2}}{\pi^2}.$$ $\endgroup$ – Jack D'Aurizio Dec 28 '16 at 16:44
1
$\begingroup$

These are two distinct inputs. $\pi / 2 / \pi^2$ (wolfram input) is interpreted as $\frac{\frac{\pi}{2}}{\pi^2} = \frac{\pi}{2 \pi^2}$ because of the left-to-right order of performing operations, while if you introduce parentheses as in $(\pi) / (2 / (\pi^2))$ (symbolab input) it's interpreted as $\frac{\pi}{\frac{2}{\pi^2}} = \frac{\pi^3}{2}$, which is why you get two different results.

$\endgroup$
  • $\begingroup$ Thanks for the reply! I noticed the brackets added differently by symbolab and wolfram. Do you know if there's a correct way to interpret the original fraction without adding brackets? It seems to me that you have to choose to put some in one way or another, I'm trying to work out how to tell which would be the correct use of brackets for a situation. $\endgroup$ – Scottmeup Dec 28 '16 at 15:48
  • $\begingroup$ Without the brackets THE correct way to interpret it is following the left-to-right rule (i.e., how Wolfram got it). There is no alternative approach here. You can alter the expression and hence the result by the use of parentheses which may be correct depending on the circumstances but that's up to you to decide whether there should be parentheses and where or not. All in all $\pi / 2 / \pi^2$ is just equal to $\frac{1}{2 \pi}$. $\endgroup$ – Hirek Kubica Dec 28 '16 at 18:16
  • $\begingroup$ Thanks for the clarification Hirek, it's very much appreciated. $\endgroup$ – Scottmeup Dec 29 '16 at 9:47
1
$\begingroup$

Wolfram and all computer languages I know will evaluate $a/b/c$ from left to right, giving $a/b/c=(a/b)/c=a/(bc)$ This is a good reason to use parentheses in this expression to make sure you get what you want.

$\endgroup$

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.