# What is the price that maximze the number of cups sold and how many cups are sold at this price?A girl is selling coffee throughout winter. Suppose the number of cups sold is given by the function...

What is the price that maximze the number of cups sold and how many cups are sold at this price?

A girl is selling coffee throughout winter. Suppose the number of cups sold is given by the function n(x)= x^(2-x) + 2. where the price, x in dollars determines the number of cups sold per day, n, in hundreds.

*print*Print*list*Cite

### 2 Answers

You should notice that this is an optimization problem that involves derivative of the given function.

You should come up with the substitution `y=n(x)` such that:

`y = x^(2-x) + 2`

Since the function `x^(2-x)` is neither an exponential function of form `a^x` , nor a power function of form `x^a,` you need to use the next formula of differentiation:

`x^(2-x) = (2-x)*x^(2-x-1) + x^(2-x)*ln x`

Notice that the function is considered first a power function and it is consequently differentiated then the function is differentiated like it would be an exponential function.

Hence, differentiating the function with respect to x yields

`(dy)/(dx) = (2-x)*x^(2-x-1) + x^(2-x)*ln x`

`(dy)/(dx) = (2-x)*x^(1-x) + x^(2-x)*ln x`

You need to solve the equation `(dy)/(dx) = 0` to find x value that maximizes the function such that:

`(2-x)*x^(1-x) + x^(2-x)*ln x = 0`

You need to factor out `x^(1-x) ` such that:

`x^(1-x)*(2 - x + x*ln x) = 0`

`x^(1-x) = 0 =gt x = 0`

`2 - x + x*ln x = 0 =gt x - 2 = x*ln x`

Notice that the graph of function `x*ln x ` (orange curve) does not intercept the graph of x-2, the black line, hence the equation `x - 2 = x*ln x` has no solution.

**If the price x is 0 dollars, there is no sell done, hence the model of function selected to represent the number of cups sold is inconsistent.**

n(x)= x^(2-x) + 2

==> n(x)= x^2 / x^x + 2

We need to find the maximum value.

`==gt n'(x)= ((x^x)(x^2)'- (x^2)(x^x)')/ x^(2x) `

`=gt n'(x)= ((x^x)(x^2 ln 2) - (x^2)(x^x)lnx)/(x^(2x)) `

`==gt n'(x)=((x^x)(x^2 )( ln 2 - lnx))/ (x^(2x))`

`` Now we will find the derivative's zero.

==> x= 0

==> ln2 - lnx = 0 ==> x = 2

We will not consider x= 0 because the price can not be 0 in order to profit.

**Then, the price that maximizes the selling is x= 2 **

Now we will find the number of cups sold.

==> n(2)= 2^(2-2) + 2 = 1 + 2= 3

**==> Then the total number of cups is 300 cups.**