# Need some help with my math homework (pretty please?)

Can someone help with a problem from my math textbook? This is the problem I'm stuck on:

I don't really get how these kinds of problems work. I think they want me to find the width of the rectangle? But how would I do that?

Now before you complain "This is the wrong site for solving math textbook problems", that's not what I'm here for. You see, I tried posting this over at math.SE, but immediately got downvoted to oblivion — apparently, I need to show what I've tried so far. Well, I've tried two things — none of them worked, and worst of all, I've forgotten what they were.

Could someone help me remember the two things I tried to use while working on this?

Hint 1:

@GPR solved for $$x$$ in the comments correct to four decimal places, but for this puzzle, you'll need higher precision.

Hint 2:

The problem statement is phrased rather strangely, almost as if the words are chosen specifically to (nearly) fit some kind of pattern ...

Notes: 1. The above backstory is fictional. 2. The final answers are two words. 3. The puzzle is entirely contained in the image: there's nothing hidden in the flavor-text. In case you have trouble viewing the image, here's the text version.

• If it helps anyone, $x$ (a.k.a. $\overline{AB}$ or $\overline{CD}) = -7 + 3 \sqrt6$ or $0.3485$ miles, and $\overline{AD}$ and $\overline{BC}$ are $7 + 3 \sqrt6 = 14.3485$ miles, giving a total perimiter of $29.3939$ miles. This is a very tall, narrow rectangle. Commented May 31 at 18:09
• $2x$ reminds me of a lecture I was giving, where a student kept making me read out the vector $a{\bf i}+b{\bf j}+c{\bf k}$ over and over, asking "what was that middle term again?". I assume that is unrelated to this riddle.
– tkf
Commented Jun 1 at 4:28
• Per Ankoganit's hint, $x$ is $0.34846922834953429459185222411767$ (to as many decimal places as my calculator displays). Commented Jun 3 at 16:55
• Per Hint 2, the differences between the word-lengths in the image and the decimal expansion of $x$ are (bracket denotes the position after the decimal point): a: 1->4 (4); to: 2->5 (13); 5: 1->3 (14); 2AB: 3->1 (21); widthwise: 9->6 (31). It is interesting that @GentlePurpleRain 's expansion is exactly sufficient for this purpose. Commented Jun 4 at 14:24

A lot of the work has been previously done in the comments by GentlePurpleRain and Benjamin Wang but I think the two things you tried to use while working on this were

ABACI and DECAF

Firstly solve for $$x$$

The central equation reduces to $$AB + 14 = BC$$ with the condition that $$AB \times BC = 5$$ or, overall, $$AB^2 + 14AB - 5 = 0$$ which is solved by GentlePurpleRain in the comments as $$AB = 3\sqrt{6} - 7$$ (after taking the positive square root).
Given that $$AB < BC$$ (as can be verified by the equations), we find that this is the width and so $$x = 3\sqrt{6} - 7$$

Numerically

GentlePurpleRain expanded the value of $$x$$ to $$32$$ decimal places as follows $$x = 0.34846922834953429459185222411767\ldots$$

Now notice that (as per hint 2)

This decimal expansion almost corresponds to the number of letters in each word of the image, in order.

As Benjamin Wang pointed out, there are five exceptions to this:
The 4th word ("a") has length 1 while the 4th decimal place is 4.
The 13th word ("to") has length 2 while the 13th decimal place is 5.
The 14th word ("5") has length 1 while the 14th decimal places is 3.
The 21st word ("2AB") has length 3 while the 21st decimal place is 1.
The 31st word ("widthwise") has length 9 while the 31st decimal place is 6.

Finally

Reading the lengths of the errant words in order 1,2,1,3,9 and converting each number to the corresponding letter of the alphabet gives ABACI.

Similarly, reading each errant decimal place in order 4,5,3,1,6 and converting each number to the corresponding letter of the alphabet gives DECAF.

• Well done! I guess calculators and regular coffee might have got the job done better than abaci and decaf... :P Commented Jun 4 at 16:10
• @Ankoganit After seeing the solution, I'd love to see a wrap-up post explaining what went into making it. Commented Jun 4 at 16:17
• Correct, well done! @GentlePurpleRain that sounds great! The actual process took a lot of trial and error and I'm not how much of that would be interesting to read about, but I'll try to write up a short summary. Commented Jun 4 at 16:53
• @GentlePurpleRain did you already know the number of decimal places required? Commented Jun 5 at 7:13
• @BenjaminWang No, as I stated in my comment, I just included all the digits that were shown on my calculator (Google). I suspect that most online calculators display a similar number of digits. Commented Jun 5 at 16:31

# Wrap-up: The Making Of "Need some help ..."

This is not a solution to the puzzle, but provides notes from its poser. This type of answer has been approved by the community.

Caution: This post contains spoilers.

### Inspiration

I've always wanted to try my hand at constrained writing exercises in the same vein as Pilish. I also love self-reference; one of my favorite mnemonics is "We require a mnemonic to remember $$e$$ whenever we scribble math" for the digits of $$e$$. From here it was natural to wonder "Can I make a math problem whose letter-counts spell out the answer?"

### Creative and logistical steps

I wanted my math problem to have an irrational answer so that its decimal expansion is "interesting" enough -- the simplest way to do that would be a quadratic equation, which quickly led to a plan for the general structure of the problem.

Now I had to find the right numbers $$a,b$$ so that the quadratic equation $$x(x+a)=b$$ would have a usable solution. I guessed the problem statement would be about 30 words long, so I wrote a program to list out the possible $$(a,b)$$ pairs that ensure the decimal expansion of $$x$$ till 30 digits does not contain zeros. In standard Pilish convention, 0s are handled by words of length 10; but this was already going to be a tricky puzzle, and seemingly arbitrary choices of convention would have made it unreasonable. So I decided against including 0s at all.

The following were the first few outputs:

6 5 0.741657386773941385583748732316
8 4 0.472135954999579392818347337462
8 8 0.898979485566356196394568149412
13 12 0.865459931328117679287687295175
14 2 0.141428428542849997999399811367
14 5 0.348469228349534294591852224118
14 7 0.483314773547882771167497464633
17 5 0.289197915623472862973485652196
18 15 0.797958971132712392789136298824
19 9 0.462429422585637569983129594744
22 18 0.789826122551595968469183751358
23 14 0.593386622447824478549919845455
24 9 0.369316876852981649464229567922
24 12 0.489995996796796411693786241879

A lot of these contain sequences that are next to impossible to work with, especially while trying to make the problem statement as natural-sounding as possible. For example, $$x$$ for $$a=8,b=8$$ starts with $$0.898979...$$, which would force a clunky sequence of long words right at the start.

Around this time I had the idea to make the answer extraction based on deviations from the pattern. This would give me a little more freedom -- I could get around particularly awkward sequences of digits by changing one of them. I needed thematic words composed of the letters from A to I (corresponding to digits 1 through 9), and per this qat query ABACI and DECAF seemed to fit the best.

My initial attempts were using $$a=6,b=5$$. Some early versions looked like this: A lot of this was "forced"; the word rectangle had to appear in a problem about rectangle, and having that fixed, I had to build the rest of the sentence around it. But clearly I needed more words. So I re-ran my search, this time with 40 digits:

8 8 0.8989794855663561963945681494117827839319
14 2 0.1414284285428499979993998113672652787662
14 5 0.3484692283495342945918522241176741758978
17 5 0.2891979156234728629734856521964919926183
18 15 0.7979589711327123927891362988235655678638
24 12 0.4899959967967964116937862418795889221459

Among these, $$(14,5)$$ seemed to have the fewest awkward sequences. The rest of the process was somewhat tedious: I started by putting "rectangle" and "fourteen" in the spots that seemed the most convenient, and had to build the rest of the problem around that. I was still trying to compose the statement purely with words rather than math symbols, but the sequences $$...222...$$ and $$...9228...$$ forced me to give up on that. The unit of measurement was also forced by length constraints. The squared unit had to come after "5", the plain unit after "fourteen", and only miles and sqmi. fit the pattern neatly enough.

### Takeaway

Making this was a lot of fun! The first time I had a working problem statement was a super-satisfying moment, and I'm pretty happy with how the final version turned out.

I didn't do a great job ensuring there's a natural path to the solution. As a solver, you'd have to observe a very specific pattern, and the only way to do that is to stumble onto it. The problem statement on its face doesn't give you a whole lot to work with, so the puzzle ended up trickier than intended. If I were to re-do this, I'd include some clues in the rest of the puzzle to gently nudge the solver towards the right idea.

• super cool puzzle idea and execution!
– JLee
Commented Jun 15 at 11:24