Trying to apply mathematics into a real-life context

Earlier today, I was trying to place my storybook into my wardrobe drawer, only to find that I could only place it horizontally as the height of my book exceeds the height of my drawer. Out of curiosity, I tried to rotate the book by holding the spine and observe how much it can rotate, until three of the vertices touched a point of the drawer.

A question came to me as I had reached a point of time when the book could no longer rotate further: By keeping the height of the drawer constant, what is the minimum length of the drawer such that the book can be stored inside it? (A silly question, I know, considering that drawers are always quite long, but aroused my interest nevertheless..)

I proceeded by measuring the dimensions I think I need to solve my problem. I have measured: The height of the drawer, $17 cm$
The length of the spine of the book, $2.2 cm$
The height of the spine of the book, $17.8 cm$
And I have attempted to represent the problem in the diagram below, solving for $x$ Representation of the problem With my mathematics knowledge up to grade 10, initially, I had thought that this will be solved using simultaneous equations, but after pondering for quite some time, I had managed to come up with an approach using R-Formula:

I started by setting $\angle WDA=\theta$, and since the drawer and my book are rectangular, $\angle BAX=\angle DCZ=\theta$
Using these information, I expressed $x$ in trigonometric terms: $x=17.8 \sin\theta + 2.2 \cos\theta$
Using the R-Formula, I get $x=\sqrt(321.68)\sin(\theta+7.045769125^\circ)$.

Next, I attempt to solve for $\theta$ by expressing $WZ=17$ in trigonometric terms as well.
I get: $17=17.8\cos\theta+2.2\sin\theta$
$17=\sqrt(321.68)\cos(\theta-7.045769125^\circ)$ $\theta\approx 25.63217562^\circ$

Finally, I substituted this value of $\theta$ into $x$ and I get: $x=\sqrt(321.68) \sin(32.67794475^\circ)$ $x\approx 9.683637217cm$

My actual measurement of the value of $x$ is $10.5cm$. I did expect inaccuracy as I measured just with a fifteen-centimetre ruler, a pair of wobbly hands and considered parallax error, although I did not expect the discrepancy to be nearly $1cm$.

I have two questions regarding this problem of mine:
Is my approach a valid approach?
Is there an easier approach to solve this problem?


The is already an error in your initial formula ... So that was a typo in your question, and I cannot find an error in your computation now.

Here is a possible different approach which gives an explicit formula for the result.

Using $$ \begin{aligned} w &= 2.2 \text{ (width of book)}\\ h &= 17.8 \text{ (height of book)}\\ H &= 17 \text{ (height of shelf)}\\ y &= \text{distance from D to Z} \\ \theta &\text{ angle of book, as in your sketch} \end{aligned} $$ we have $$ \sin \theta = \frac yw \, , \quad \cos\theta = \frac{H-y}{h} $$ and therefore $$ 1 = \sin^2 \theta + \cos^2 \theta = \left(\frac yw\right) ^2 + \left(\frac{H-y}{h}\right)^2 \, . $$ This is a quadratic equation for $y$, and the positive solution is $$ y = \frac{w^2H + wh\sqrt{w^2+h^2-H^2}}{w^2+h^2} $$ (One can conclude from $h > H$ that the other solution is negative.) It follows that $$ \sin \theta = \frac yw = \frac{wH + h\sqrt{w^2+h^2-H^2}}{w^2+h^2} \\ \cos\theta = \frac{H-y}{h} = \frac{hH - w\sqrt{w^2+h^2-H^2}}{w^2+h^2} $$ Finally $$ x=h \sin\theta + w \cos\theta = \frac{2whH + (h^2-w^2)\sqrt{w^2+h^2-H^2}}{w^2+h^2} . $$ Using PARI/GP, this evaluates to $x \approx 9.6836372165163056823433168189573517183$, which is your result.

I made a sketch with Geogebra which shows that the result is plausible:

enter image description here


Here's a slightly different way to visualize the problem:

enter image description here

When the book is as close to upright as possible, the diagonal $AC$ will just touch the top and bottom of the drawer. That is, you have a right triangle $\triangle AEC$ with hypotenuse equal to the diagonal of rectangle $ABCD$ and one leg, $AE$, equal to the height of the drawer.

The other diagonal of the book, $BD$, touches the end of the drawer at $D$ and makes right triangle $\triangle BFD$ with hypotenuse equal to the diagonal of rectangle $ABCD$ and one leg lying along the side of the drawer. The other leg is the length you want to measure, $x = BF$.

Let $\angle ADF = \theta$ and $\angle BDA = \alpha$. Then $\angle DAE = \theta$ (because line $DF$ is parallel to line $AE$) and $\angle BDA = \alpha$ (by congruent triangles). Considering the angles with vertex at $A$ and the angles with vertex at $D$, we have \begin{align} \angle CAE = \theta - \alpha, \\ \angle BDF = \theta + \alpha. \end{align} Then \begin{align} AC = BD &= \sqrt{(AB)^2 + (AD)^2}, \\ \alpha &= \arcsin\frac{AB}{BD}, \\ \theta - \alpha &= \arccos\frac{AE}{AC}, \\ \theta + \alpha &= (\theta - \alpha) + 2\alpha, \\ x = BF &= BD \sin(\theta + \alpha). \end{align}

Starting with $AB =2.2$, $AD=17.8$, and $AE=17$, work each of these equations one after the other, using known values on the right-hand side each time, and the answer comes out to $9.68363721431$, just as you found.

You may also notice that this method illustrates how the R-formula works. We have $$ x = BF = AD \sin\theta + AB\cos\theta = 17.8\sin\theta + 2.2\cos\theta$$ for the same reasons you found, but also $$ x = BF = BD \sin(\theta + \alpha) = \sqrt{321.68} \sin(\theta + 7.04576912\text{ degrees}).$$