Question 329629
x is what you want to spend.
3000 <= x <= 8000


You need 35 tons of rocks.
Each rock costs $60 and each tree costs $99.


How many trees can you buy out of a budget of $24,000?


You need 35 tons of rocks at $60 a ton.


This means that you need a total of 35 * 60 = $2100 for rocks.


If you spend $3000 on the garden, then the number of trees you can buy would be equal to $3000 - $2100 / $99 = 9.09..... which rounds out to 9 trees.


If you spend $8000 on the garden, then the number of trees you can buy would be equal to $8000 - $2100 / $99 = 59.59..... which rounds out to 59 trees.


Since you do not want to spend less than $3,000 and you do not want to spend more than $8,000 then the fact that you have a budget of $24,000 is irrelevant.


If you spend as little as $3,000, then $21,000 remains as cash available for future projects.


If you spend as much as $8,000, then $16,000 remains as cash available for future projects.


Your formula for the number of trees you can buy would be as follows:


x >= $3000
x <= $8000
budget = $24000
rocks = $60 * 35 = 2100
trees = (x - 2100) / 99 truncated to the nearest integer that is less than that value.


You can graph this as follows:


{{{graph(600,600,-1,10,-10,80,(1000*x-2100)/99,9,59)}}}


On this graph, the value of x is given in thousands.


3 = 3000
8 = 8000


The value of y is the numnber of trees you can buy.


I set y = 9 and y = 59 to show you that these values occur at around x = 3 and x = 8


This means that when x = 3000, 9 trees can be bought.


this also means that when x = 8000, 59 trees can be bought.


You can plot the number of tree you can buy in between by looking at the graph or by solving the equation for any value of x between 3000 and 8000.


The equation used to solve is:


y = (x-2100)/99 truncated to the nearest integer smaller than or equal to y.


For example:


When x = 5000, the equation becomes:


y = (5000 - 2100) / 99 = 29.29..... which truncates to 29.


Look on the graph and you will see that when y = 29, the value of x is somewhere around 5.


Here's the graph again, with the value of y = 29 shown.


{{{graph(600,600,-1,10,-10,80,(1000*x-2100)/99,29)}}}


In these graphs, the value of x below 3 and above 8 are irrelevant and not to be considered.


The equation for how much money is left in the budget would be:


y = $24000 - x.


In this case y would equal the money that is left in the budget.


The graph for the money that is left in the budget is shown below:


{{{graph(600,600,-1,10,-10,30,(24000 - 1000*x)/1000,16,21)}}}


In this graph, y represents the amount of money that is left in the budget in thousands of dollars.


$24,000 equals 24 on the graph


In this graph, x represents the amount of money that is spent on the project in thousands of dollars.


$3000 = 3 on the graph
$8000 = 8 on the graph.


The only values of x that are relevant would be the values of x from 3 to 8.


You can see that when x = 3, y = 21 which means that $21,000 is left in the budget after $3000 was spent.


You can also see that when x = 8, y = 16 which means that $16,000 is left in the budget after $8000 was spent.