Recursively computing sums of cubes, cont. (a) Use induction to prove that your algorithm to compute the sum of the cubes of the first n positive integers returns the correct value for every positive integer input.
Added by Michael M.
Step 1
The sum of the cubes of the first 1 positive integer is 1^3 = 1. If we plug n=1 into our algorithm, it should return 1. Show more…
Show all steps
Close
Your feedback will help us improve your experience
Vincenzo Zaccaro and 54 other Calculus 3 educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Prove that the recursive algorithm for finding the sum of the first $n$ positive integers you found in Exercise 8 is correct.
Induction and Recursion
Recursive Algorithms
The sum of the first $n$ perfect cubes is given by the formula $S=\frac{1}{4}\left(n^{4}+2 n^{3}+n^{2}\right) .$ Use the remainder theorem on $S$ to find the sum of (a) the first three perfect cubes (divide by $n-3$ ) and (b) the first five perfect cubes (divide by $n-5$ ). Check results by adding the perfect cubes manually. To avoid working with fractions you can initially ignore the $\frac{1}{4}\left(\text { use } n^{4}+2 n^{3}+n^{2}+0 n+0\right),$ as long as you divide the remainder by 4.
Polynomial and Rational Functions
Synthetic Division; the Remainder and Factor Theorems
Recommended Textbooks
Calculus: Early Transcendentals
Thomas Calculus
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD