From: Davide P. C. <dp...@un...> - 2005-09-23 02:05:44
|
> The following has come up in our on-line homework: I have a problem > the answer to which is a linear combination of exponentials (e^{- > kt} with k small). I'm using the Parser-based fun_cmp() > evaluator. The correct answer is marked correct, but an incorrect > answer is also. > > The correct answer is > (-201/94)*e^(-t/107) + (295/94)*e^(-t/201) > but the answer > -e^(t(-1/107 -1/a))+2e^(-t/a) > with a (at least) between 175 and 250 also works. If a is 300 it > doesn't work, however. > > Is this an accuracy issue? Yes and no. Part of this will depend on the limits you are using for t, which you haven't given us. So I'll assume you are using the default 0 to 1 range for t. The two functions you site are nearly identical on that range, so they are being marked as the same, because they differ by such a small amount (less that .00005 for a=200, which is well below the tolerances). In fact, the functions are nearly linear (and nearly flat). The constant value 1 is almost good enough to be marked as correct. But the line 1+.004t IS good enough to be marked as correct. The original function is so flat for t > 0, you really need to go to a different range of t's if you want to distinguish this from other functions. It looks to me like t's between -200 and -100 might be better for your purposes. (Graph the functions and see.) Davide |