Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Interesting, but I still think most problems like that are solvable via Excel. Put some formulas in some cells, tweak some variables until you find a way to maximize something. Possibly use graphs or pivot tables or other advanced features to help if needed. Once you’ve figured out the solution, then you build a pretty graph for the BoD proving it. Make sure to keep the spreadsheet around as evidence.


Sure, for some applications of calculus can use just discrete steps. That is, instead of the calculus dy/dt just use something like (y)dt.

Then, for the arithmetic, some code can be short and, compared with cells in a spreadsheet, easier and with more control over the time steps, e.g., in Rexx with cf for customer fraction:

     Say '        ==== Growth ===='
     Say ' '
     Say '                Customer'
     Say '     Year       Fraction'

     max_years = 5
     steps_per_year = 10 * 365
     cf = 1 * ( 1 / 100 )
     year = 1
     k = 1 * ( 1 / 2000 )
     Do Forever
       Do i = 1 To steps_per_year
         cf = cf + k * cf * ( 1 - cf )
       End
       Say Format(year,9) Format(100*cf,10,2) || '%'
       If year = max_years Then Leave
       year = year + 1
     End
yielding

        ==== Growth ====

                Customer
     Year       Fraction
        1          5.89%
        2         27.97%
        3         70.66%
        4         93.73%
        5         98.93%
So, get a 'lazy S curve'. I've since learned that the curve has a name, the 'logistic curve'. And, right, can also consider that curve for other cases of growth, e.g., for a first, rough estimate, COVID.

Adjust some of the constants in the program and can get more output, say, for each month, day, etc. The code above uses 10 steps per day.

For more, someone could use the calculus solution and compare.

In a sense, for the FedEx problem and the assumptions about what was driving the growth, the calculus solution is a smooth version of the somewhat more appropriate discrete time version.

But when I did the calculation at FedEx, my best source of arithmetic was an HP calculator in which case the calculus solution was a lot easier.

Of course, this FedEx calculation was just one example and there are many others.

My view from 10,000 feet up is that in business, at times some math can be an advantage if not the work of a steady job.

If some math is an advantage, then that advantage tends to go to the owners of the business. If a mathematician wants to get paid for some math they have in mind, maybe they should start a business and be the owner.


Above gave the calculus solution in algebra and also values from discrete arithmetic with (10)(365) steps per year.

For the arithmetic for the calculus solution, in Rexx,

     y.0 = ( 1 / 100 )
     b = 1
     k = ( 1 / 2000 )

     Do t = 1 To 5
       t1 = t * (10 * 365 )
       e1 = RxCalcExp( b * k * t1, 16 )
       y.t = ( y.0 * e1 ) /  ( y.0 * ( e1 - 1 ) + b )
       Say Format(t,9) Format(100*y.t,6,2) || '%'
     End
Table below has the values from both the calculus and the discrete versions:

         ==== Growth ====

             Customer Fraction
     Year   Calculus   Discrete
        1      5.90%      5.89%
        2     27.99%     27.97%
        3     70.68%     70.66%
        4     93.73%     93.73%
        5     98.93%     98.93%
Lesson: Sometimes in growth problems with a calculus solution, a discrete version can give close results.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: