필터 지우기
필터 지우기

Help with a Newton Raphson problem

조회 수: 3 (최근 30일)
Aaron Zorzi
Aaron Zorzi 2016년 3월 1일
So I've already written a code for the actual method, but now I'm trying to solve a real world problem with it, and I've gotten stuck on what to do. This is the question:
Each widget sells for $4.00. The cost ($) to produce x widgets is:
Cost = 1000 + 2 * x + 3*x^(2/3)
Use the Newton Raphson algorithm to find out how many widgets should be produced to break even. In other words, find x such that f(x) = Cost – Sales = 0. Write a MATLAB script to solve for the number of widgets needed to break even then run your script. How many widgets are needed to break even? Check your answer by calculating Cost and Sales.
These are the parts I completed myself:
Complete equation for f(x) = f(x) = -2x+1000+3x^(2/3)
Complete equation for the Newton Raphson Update: xn+1 = xn – (-2x+1000+3x^(2/3))/(-2+(2/x^(1/3)))
The Newton code I wrote is able to calculate the 5th root of a given number by using an initial guess, and looping until it's within a certain accuracy. How can I do this problem? Thank you.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Newton-Raphson Method에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by