Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 14 Online
OpenStudy (anonymous):

Hey, I have an issue with the second problem in Problem Set 2. In the example they give, the tuple that is inputted is (-13.39, 0.0, 17.5, 3.0, 1.0) and the one that is supposed to be returned is (0.0, 35.0, 9.0, 4.0) - which is item less. Is that on purpose? Is it a mistake? Which of the items I am supposed to deduct? Thanks!

OpenStudy (e.mccormick):

Is this the part where it gives the derivative? In a simple polynomial, the derivative of a constant is 0. \((-13.39, 0.0, 17.5, 3.0, 1.0) \implies\) \(\qquad f(x)=-13.39 + 0.0x+17.5x^2+3.0x^3+1.0x^4\) Because of this, the derivative is relatively simple. \(f'(x)= 0.0+35.0x+ 9.0x^2+ 4.0x^3 \implies\) \(\qquad (0.0, 35.0, 9.0, 4.0)\)

OpenStudy (e.mccormick):

For a simple poly, you use the form of: \(f(x)=ax^n \implies f'(x)=a n x^{n-1}\) So the value of the exponent multiplies the constant and the resulting exponent is reduced by one. \(f(x)=x^4 \implies f'(x)=4 x^{4-1}\implies f'(x)=4 x^{3}\) This rule extends all the way to \(x^0\). Now, remember that in general, \(x^0=1\) because any number to the power of 0 is 1. So we can say that \(-13.99=-13.99x^0\). So lets apply this basic poly rule to \(-13.99x^0\). \(f(x)=-13.99x^0\implies f'(x)=(0)(-13.99)x^{0-1}\) and we don't need o go any further. We are multiplying the whole thing by 0, therefore it becomes 0. So why do they keep the 0.0 in the \(f'(x)\) you show? Well, that is the 0.0 from above in the x spot. They keep it because the degree of the exponent on the 4.0 is three! You have spots 0, 1, 2, and 3. Spot 0 is \(x^0\) on down to spot three is \(x^3\). So they are keeping the 0 to make the exponent on the later terms come out properly.

OpenStudy (anonymous):

Thanks!

OpenStudy (e.mccormick):

This all has to do with using what is commonly called Newton's Method, which uses \(f(x)\) and \(f'(x)\) to get progressivly closer to the answer. http://en.wikipedia.org/wiki/Newton%27s_method

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!