## Front Porch Math

By Bobby Neal Winters
The following is a real problem that a carpenter with a great respect for trigonometry came to me with.  Say you are going to add a porch of width L to the side of a house and want to over it by adding to the roof as depicted in the picture below:
The question is how long do you want your rafter to  be, i.e. what is the length of the segment D.  As it is there is not enough information in the problem.  You have to know that the slope of the current roof is 7/12, (i.e. over a run of 12 feet the roof will rise 7) and they desire the porch roof to have a slope of 3/12 (i.e. over a run of 12 feet it will rise 3.)  Yes, we could say that is a slope of 1/4, but these are how the numbers came to me, and it will all come out in the wash anyway.

I must confess that this problem took longer for me to solve than it might have because I was guided initially by the carpenters love of trigonometry.  It can be solved that way, but this is a nice case study of how imposing a coordinate system can simplify the problem.  Consider the following:
We've put on coordinates so that the outside point of the porch roof is a (0,0), the point where the old roof touches the house is (L,0), and the point where the porch roof meets the old roof is (x*, y*).

The equation for the line representing the porch roof is y=mx and for the old roof is y=nx-nL.  It is an exercise to work out that x*= nL/(n-m) and y*=mnL/(n-m).  We may use the Pythagorean Theorem (or the distance formula) to calculate the value of D2=(x*)2+(y*)2 which after substitutions simplifies to:
D2=(1+m2)n2L2/(n-m)2   or D=(1+m2)1/2 nL/(n-m).

For the given values of n and m, this works out to D=2.02598L.

Having done it this way, I also worked it by trigonometry, but I despair of reproducing those calculations without specialized mathematical software.