# How do I find the cost in a problem which doesn't mention the original number of elements?

The problem is as follows:

Mike buys an unknown quantity of hardcover books for a total of $\textrm{328 USD}$. Later on, he realizes that had he bought their respective paperback versions they had cost $\textrm{4.5 USD}$ less each and by doing this he would have ended with $4$ more books and spend only $\textrm{320 USD}$. How much was the cost of each hardcover books which Mike bought?

This problem has made me to walk in circles for several hours and finally I thought that it has something to do with a quadratic equation or so.

If I want to relate the cost of something and the number of things I would use this formula:

$$x\,\left(\frac{\textrm{cost in whatever currency}}{\textrm{per item whatever is it}}\right ) \times\,\textrm{a elements}=\textrm{total cost}$$

Therefore I used this equation in my attempt to solve this problem:

I defined the number of hardcover books as $\textrm{H}$ and the number of paperback books as $\textrm{P}$, the cost for each of the hardcover books $\textrm{x}$ and the cost for each of the paperback books as $x-4.5$ as in the problem states they would had cost $\textrm{4.5 USD}$ less each.

The first part of the problem does not specify how many and how much for the hardcover books just the total cost so the equation becomes into:

$$\left (x \right) \left ( \textrm{H}\right ) = 328$$

The second part of the problem does mention that the cost of the paperback books is $\textrm{320 USD}$ so it becomes into:

$$\left (x-4.5 \right) \left ( \textrm{P}\right ) = 320$$

There is a third relationship which has been mentioned in the problem and that is the number of paperback books is the number of hardcover books plus four therefore:

$$P=H+4$$

So the second equation becomes into:

$$\left (x-4.5 \right) \left ( \textrm{H+4}\right ) = 320$$

Then all that is left to do is solve the system:

$$\left (x \right) \times \left ( \textrm{H}\right ) = 328$$

$$\left (x-4.5 \right) \times \left ( \textrm{H+4}\right ) = 320$$

Therefore:

$$xH+4x-4.5H-4.5\times4=320$$

inserting into the previous equation the first one and $$H=\frac{328}{x}$$

$$328+4x-4.5\times\left( \frac{328}{x}\right )-18=320$$

$$4x-\frac{1476}{x}-10=0$$

Multiplying by $x$ in both sides:

$$4x^{2}-10x-1476=0$$

Simplifying:

$$2x^{2}-5x-738=0$$

To solve the quadratic equation I used the formula:

$$X_{1,2}=\frac{5 \pm \sqrt{5^{2}-4\times\left( 2 \times \left(-738 \right)\right ) }}{2\times 2}$$

$$x_{1,2}=\frac{5 \pm \sqrt{5929}}{4}$$

$$x_{1}=\frac{5+77}{4}=\frac{82}{4}=20.5$$

$$x_{2}=\frac{5-77}{4}=\frac{-72}{4}=-18$$

Now it is obvious that I cannot choose the negative value and since I defined as $x$ to be cost of each hardcover book the answer must be $\textrm{20.5 USD}$.

And the cost of the paperback book each must be: $$20.5-4.5=16.0\,\textrm{USD}$$

althought the latter was not asked.

Is what I did correct?. The answer seems reasonable, but I'm not very sure if my substitutions are correct.

Is this the only way to approach this problem or could be another way to solve it faster?.

• Did you plug it in and verify? Apr 1, 2018 at 16:46
• @AndrewLi Yes I did and it checks with the number of books (for the hardcover and paperback) however I was looking to know if there was any error in my understanding of the problem. Apr 1, 2018 at 17:05

cost per book initial - cost per book final $=4.5$

$\dfrac{328}{x}-\dfrac{320}{x+4}=\dfrac{9}{2}\tag{1}$

$$9x^2+20x-2624=0$$

$$x=16 \ books$$

so cost of each hardcover book would be : $\dfrac{328}{16}=20.5$USD

edit: your approach is correct too..but i think without introducing H (by thinking in terms of cost per book) you can save your time.

• I can also get to the $\textrm{16 books}$ from my method but you're forgetting the fact that what it is being asked is the cost of each of the hardcover books not the number of the books. Maybe you would like to explain your answer a little bit better. Apr 1, 2018 at 17:03
• that would be $\dfrac{328}{16}=20.5 USD$
– user454960
Apr 1, 2018 at 17:04
• Seems that I was not wrong. But what it would help me a lot is that you can explain where do you get your equations. In other words how did you translated them from the words into the expression you had just used. Where is $\frac{328}{x}$ and $\frac{320}{x+4}$ coming from?. Apr 1, 2018 at 17:07
• initially each of hardcover book costs (i mean 'x' hardcover books$)=\dfrac{328}{x}$ and finally you get 4 more paper books i.e,$x+4$ paper books in $320$ dollars so finally cost of each book (paperback ones) becomes $\dfrac{320}{x+4}$ and it is also given each paperback book costs $4.5$ doller less than each hardcover so initial cost of each book(hardcover) -final cost of each book(paperback) $=4.5$
– user454960
Apr 1, 2018 at 17:13

Assume that Mike bought $n$ harcover books at $h$ dollars per book. This gives the equation $$n\cdot h=328\ .\tag{1}$$ The sequel of the story then tells us that $$(n+4)\left(h-{9\over2}\right)=320\ ,\tag{2}$$ so that subtracting $(1)$ from $(2)$ we obtain the linear equation $$4h-{9\over2}n-18=-8\ ,$$ or $n={2\over 9}(4h-10)$. Plugging this into $(1)$ leads to the quadratic equation $$4h^2-10h-1476=0$$ with the single positive solution $h=20.5$. This leads to $n=16$, and it is easily verified that therewith all conditions of the story are satisfied.

Number of hardcovers = $n$

Cost of 1 hardcover $(c)$ = $\frac{328}{n}$

$\frac{328}{n}$ is the cost of one hardcover so if the paperback is 4.5 USD cheaper then one paperback is $\frac{328}{n}-4.5$. We then know that Mike can get 4 more paperbacks so the number of paperbacks he can buy is $n+4$. The number of paperbacks multiplied by the cost of each paperback is given as 320 thus:

$$(\frac{328}{n}-4.5)(n+4)=320$$ $$328+\frac{1312}{n}-4.5n-18=320$$ $$\frac{1312}{n}-4.5n=10$$ $$4.5n^2+10n-1312=0$$ $$9n^2+20n-2624=0$$ $$n=16,n=-\frac{164}{9}$$

$n$ must be positive (since it is the number of books), therefore $n=16$

Cost of 1 hardcover $(c)$ = $\frac{328}{n}$

So $C = \frac{328}{16}=20.50$ USD

So yes, you are indeed correct but I think you made it a bit too complicated.

• Thanks for the recent additions into your answer but what it would help me better is that if you could explain with words why we're multiplying $\left ( \frac{328}{n}-4.5\right ) \left ( n+4\right )$ is it because of the formula which I alluded in my question? Apr 1, 2018 at 17:12
• Do not forget that the question was not the number of books it was the cost of each of the original hardcover books which Mike had bought. Apr 1, 2018 at 17:13