Respuesta :
Let the number of holes of golf you can play be x before your money runs out. I assume both the costs of playing and the income should be equal.
Let your expenses be 25 + 0.50x
Let your income be
a = 18
n = x
d = -1
Sum of income =(a + L)*n/2; L = a + (n - 1)*d
sum of income = (a + a + (x - 1)*d )*x/2
Sum of income = (2a + (x- 1)*(-1) ) * x/2
Sum of income = (2*18 + (x -1 ) (-1) ) * x / 2
Sum of income = (36 - x + 1) * x / 2
Sum of income = (37 - x )* x / 2 Now the income has to equal the expenses.
25 + 0.5x = (37 - x)*x/2 Multiply both sides by 2 and remove the brackets.
50 + x = 37x - x^2 Bring the right side over to the left.
x^2 - 36x + 50 = 0
You need help from the quadratic formula
a = 1
b = -36
c = 50
This does not come to anything nice. I'm getting x = 34.6 holes or x = 1.44.
Your pleasure function is a second-degree function that includes the points
... (1, 18), (2, 35), (3, 51)
There are a number of ways you can determine the function's coefficients, including writing a system of equations, using Lagrange interpolating polynomials, or using quadratic regression on your calculator. The pleasure function p(h) is
... p(h) = (h/2)(37-h)
The cost function c(h) gives the amount you must pay for playing h holes. It is
... c(h) = 25 + 0.5h
The difference between these functions will be the excess of pleasure over cost. We could call it the joy function j(h). It will be
... j(h) = p(h) - c(h)
... j(h) = -0.5h² +18h -25
This will have a maximum at h= -b/2a = -18/(2·(-0.5)) = 18. (a, b refer to the x² and x coefficients in ax²+bx+c, the standard quadratic form)
For maximum joy, you will play 18 holes of golf.
