<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Dave<div><br></div><div>It seems to me that part of the art of programming is learning enough about the domain that you are modeling to get by. Otherwise how can you tell if your program is correct?</div><div><br></div><div>Unfortunately math(s) is a bugbear for many (most?) people at some level, and especially calculus. But I believe that one of the side-aims of htdp is to help people better understand some fundamental (I won't say "basic") mathematical concepts, brought to life and clarified in programs.</div><div><br></div><div>I am not sure if that is the kind of answer that you want to hear, but good luck regardless!</div><div><br></div><div>-- Dan "give math a chance" Prager</div><div><br></div><div><br><div><div>On 10/02/2009, at 12:34 PM, David Yrueta wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi Dan --<br><br>Thanks for the reply. Unfortunately for me, I'm not mathematically literate enough to understand how to derive the bases and altitudes of the trapezoids from the proposed function arguments. Or in other words, I don't understand how the function arguments relate to one another, and what the terms [a,(a+b)/2 and [(a+b)/2, b] mean once the argument values are plugged in. Never made it past high school trig, and the metaphysics of Being studied in my university philosophy courses didn't have much to say about areas under a curve :) <br> <br>I'm hoping that the principal author of the problem (MF) might come to my rescue here. <br><br>Thanks again for the time!<br><br>Cheers, <br>Dave<br><br><div class="gmail_quote">On Mon, Feb 9, 2009 at 5:02 PM, <span dir="ltr"><<a href="mailto:danprager@optusnet.com.au">danprager@optusnet.com.au</a>></span> wrote:<br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Dave<br> <br> Without having the time (or patience) to read the example, it's almost certainly a divide-and-conquer approach.<br> <br> You use a trapezoid to approximate the area under the curve. There's some error involved, but by using 2 (or 4 or ..) smaller trapezoids the net error using the smaller trapezoids gets smaller as they get more numerous, because the multiple line segments hug the curve more closely.<br> <br> Drawing pictures with an example non-linear function should help a lot here.<br> <br> -- Dan<br> <div><div></div><div class="Wj3C7c"><br> <br> <br> > David Yrueta <<a href="mailto:dyrueta@gmail.com">dyrueta@gmail.com</a>> wrote:<br> ><br> > Thanks Dan. Looks like the original formatting from HtDP didn't carry<br> > over<br> > from my cut-and-paste. Still don't really understand how this relates<br> > to<br> > the question of computing the "area of each trapezoid," though.<br> ><br> > Cheers,<br> > Dave<br> ><br> > On Mon, Feb 9, 2009 at 3:32 PM, <<a href="mailto:danprager@optusnet.com.au">danprager@optusnet.com.au</a>> wrote:<br> ><br> > ><br> > > > divide the interval into two parts: [a,(a + b/2)] and [(a + b/2),b];<br> > ><br> > > Try: [a,(a+b)/2 and [(a+b)/2, b]<br> > ><br> > > (a+b)/2 is the mid-point between a and b: (a + b/2) ain't.<br> > ><br> > > -- Dan<br> > ><br> </div></div></blockquote></div><br></blockquote></div><br></div></body></html>