Why Is Maple Giving Incorrect Answers for Summations?

In summary, Homework Equations in Maple seem to be complicated by the computer giving incorrect answers to simple problems. However, by using the factor command, the correct answer is revealed. Additionally, there seems to be an issue with the evalb command, where it returns false for true equations when the equation is not simplified.
  • #1
stripes
266
0

Homework Statement



Verify the following summations using Maple (see image).

Homework Equations



None

The Attempt at a Solution



For the first one, I enter

Code:
sum(k^3, k=1..n);

in Maple, and the result is

1/4*(n+1)^4-1/2*(n+1)^3+1/4*(n+1)^2,

which is definitely not the answer. Why is Maple giving me these weird and incorrect answers? The question is rather simple as I am just supposed to verify these summations using a computer, but for some reason, my computer seems to be complicating things.
 

Attachments

  • sum.jpg
    sum.jpg
    7.3 KB · Views: 451
Last edited:
Physics news on Phys.org
  • #2
Okay, so it seems if I type

Code:
factor(sum(k^3, k=1..n));
,

I get the correct answer. What gives?
 
  • #3
Similarly,

Code:
sum(x^k, k=0..infinity);
1
- -----
x - 1

which = 1/(1-x).

But when I type

Code:
evalb(-1/(x-1) = 1/(1-x));

I obtain false. But they are equal! Am I completely missing something with Maple here?
 
  • #4
Hi stripes. Are you aware that there is usually more than one way to write any given mathematical expression, for example an expanded and a factorized form.

Look at a simple example.
[tex]\frac{1}{x} - \frac{1}{x+1} = \frac{1}{x(x+1)}[/tex]
Writing it one way as opposed to the other makes it neither weird nor wrong.
 
  • #5
uart said:
Hi stripes. Are you aware that there is usually more than one way to write any given mathematical expression, for example an expanded and a factorized form.

Look at a simple example.
[tex]\frac{1}{x} - \frac{1}{x+1} = \frac{1}{x(x+1)}[/tex]
Writing it one way as opposed to the other makes it neither weird nor wrong.

Oh, I understand that completely. I think most people on this forum do. What is puzzling me is that when I am given the expanded form, I don't immediately recognize it as being the correct answer because I am not quite a mathematician yet. So when I try to see if the expanded expression is equal to the factored expression, by using the evalb() operator in Maple, I get "false". I think one of my posts explained that. That's what's puzzling.

In other words, Maple is telling me 1/(1-x) =/= -1/(x-1), but they are, in fact, equal. This is my issue.
 
  • #6
Ok I see. I thought it was just the factorized versus expanded form of the expression that was confusing you.

I don't know why "evalb" returns false like that on expressions that seem obviously equivalent. Maybe if you post a question on that problem in the "Maths and Science Software" forum someone there may know. :smile:
 
  • #7
For the sum question, I have found that Maple tends to give expanded versions for some reason; to simplify that, just use the factor command. As far as the evalb thing, I've been messing around with Maple to try to figure it out, then looked on the website page for the evalb command, and there seems to be an issue of returning false for true equations when an equation is not simplified. This information can be found here.
 

Related to Why Is Maple Giving Incorrect Answers for Summations?

1. How do I use Maple to verify a summation?

To verify a summation using Maple, you can use the sum() function. This function takes in the expression to be summed, the variable of summation, and the range of the summation. For example, if you want to verify the summation of i from 1 to 10, you would use sum(i, i=1..10). This will give you the result of the summation as well as the steps taken to reach the answer.

2. Can I verify more complex summations with Maple?

Yes, Maple can handle more complex summations with multiple variables and different ranges. You can use the sum() function with multiple expressions and variables, and specify the ranges for each variable. You can also use built-in functions such as the product() function for products, and the int() function for integrals.

3. How does Maple handle infinite summations?

Maple has a built-in function called suminf() that allows you to verify infinite summations. You can specify the expression to be summed and the variable of summation, and Maple will give you the result as well as the steps taken to reach the answer. However, it is important to note that not all infinite summations can be verified analytically.

4. Can I verify summations with constraints using Maple?

Yes, Maple has a feature called assuming() that allows you to specify assumptions for your variables. This can be useful when verifying summations with constraints or conditions. For example, you can use assuming(n > 0) to specify that n is greater than 0 in your summation.

5. Is there a way to visualize summations using Maple?

Yes, Maple has a plot() function that allows you to visualize summations. You can use this function to plot the summation as a function of the variable of summation. This can be helpful in understanding the behavior of the summation and identifying any patterns or trends.

Similar threads

Replies
15
Views
2K
Replies
3
Views
2K
Replies
8
Views
2K
Replies
4
Views
2K
Replies
1
Views
1K
Back
Top