The Museum of HP Calculators

HP Forum Archive 19

[ Return to Index | Top of Index ]

Help solving equation
Message #1 Posted by Geir Isene on 29 Dec 2010, 10:16 a.m.

It would be great if someone here could help me symbolically solve the following equation - it is part of an upcoming program to calculate the "processability" of a business area (i.e. if it is a sound business decision to create a process for a certain area of business). To be able to solve the bigger equation, I need help solving this one:

Solve for x:

(a^x)/x = b

      
Re: Help solving equation
Message #2 Posted by dietmar13 on 29 Dec 2010, 10:25 a.m.,
in response to message #1 by Geir Isene

wolfram alpha is always your friend...

http://www.wolframalpha.com/input/?i=%28a^x%29%2Fx+%3D+b+solve+for+x

            
Re: Help solving equation
Message #3 Posted by Geir Isene on 29 Dec 2010, 10:30 a.m.,
in response to message #2 by dietmar13

Wow. Excellent. Wolfram is a better resource after this.

            
Re: Help solving equation
Message #4 Posted by Geir Isene on 29 Dec 2010, 12:48 p.m.,
in response to message #2 by dietmar13

Looking into this further, I am unsure of how I would go about resolving the following in an HP-41 program:

How do I handle the Lambert W-Function in a program?

                  
Re: Help solving equation
Message #5 Posted by Massimo Gnerucci (Italy) on 29 Dec 2010, 1:20 p.m.,
in response to message #4 by Geir Isene

Quote:
I am unsure of how I would go about resolving the following in an HP-41 program

If you really need to... :-)
try with HP-41Z module by 聲gel.

Greetings,
Massimo

Edited: 29 Dec 2010, 1:22 p.m.

                        
Re: Help solving equation
Message #6 Posted by Geir Isene on 29 Dec 2010, 1:34 p.m.,
in response to message #5 by Massimo Gnerucci (Italy)

OK, but how?

                              
Re: Help solving equation
Message #7 Posted by PeterP on 29 Dec 2010, 2:37 p.m.,
in response to message #6 by Geir Isene

This gives a good explanation as well as the numerical evaluation at the bottom

as well as here in Wolfram Alpha

[link:http://www.google.com/url?sa=t&source=web&cd=2&ved=0CCUQFjAB&url=http%3A%2%2Fciteseerx.ist.psu.edu%2Fviewdoc%2Fdownload%3Fdoi%3D10.1.1.86.9305%26rep%3Drep1%26type%3Dpdf&rct=j&q=how%20to%20calculate%20the%20lambert%20W%20function&ei=8o0bTcrBIoLGlQfxh6jJCw&usg=AFQjCNGzCdFCPN-BNVvFeSmeqBIbaY59AA&sig2=-qIe1lZhmayysqt745QTmg&cad=rja]and here if you *really* want to know a whole lot about the W (as well as a last chapter on numerical evaluation)[/link]

Cheers

Peter

Edited: 29 Dec 2010, 2:43 p.m.

                                    
Re: Help solving equation
Message #8 Posted by Geir Isene on 29 Dec 2010, 3:17 p.m.,
in response to message #7 by PeterP

I am looking for a simpler, more basic approximation - see further down on the "math challenge"; An approximation of the original function to make the symbolic solve easier without it becoming recursive and such.

                              
Re: Help solving equation
Message #9 Posted by Thomas Klemm on 29 Dec 2010, 3:23 p.m.,
in response to message #6 by Geir Isene

Here's the Lambert W function:

 01 LBL "W"
 02 STO M
 03 0
 04 STO N
 05 LBL 00
 06 RCL N
 07 ENTER
 08 ENTER
 09 E^X
 10 *
 11 LASTX
 12 1
 13 R^
 14 +
 15 *
 16 LASTX
 17 1/X
 18 1
 19 +
 20 2
 21 /
 22 R^
 23 RCL M
 24 -
 25 ENTER
 26 RDN
 27 *
 28 -
 29 /
 30 ST- N
 31 ABS
 32 RND
 33 X#0?
 34 GTO 00
 35 RCL N
 36 END

Here's how to use it:

a ENTER b

X<>Y
LN
CHS
STO 00
X<>Y
/
XEQ "W"
RCL 00
/

I'm using:

HTH
Thomas

                                    
Re: Help solving equation
Message #10 Posted by Geir Isene on 29 Dec 2010, 3:52 p.m.,
in response to message #9 by Thomas Klemm

It sure does :)

                                    
Re: Help solving equation
Message #11 Posted by Gerson W. Barbosa on 29 Dec 2010, 6:25 p.m.,
in response to message #9 by Thomas Klemm

Alternatively, if you have the Advantage Module:

 01 LBL 'W
 02 STO 01
 03 CLx
 04 ENTER
 05 10^x
 06 'L
 07 SOLVE
 08 RTN

01 LBL 'L 02 e^x 03 * 04 RCL 01 05 - 06 RTN

Example, using your procedure:

2 ENTER 32

x<>y LN CHS STO 00 x<>y / XEQ "W" RCL 00 / --> 0.031949779

2 x<>y y^x LASTx / --> 31.99999999

Another solution is x = 8, but this requires the other real branch of Lambert W.

Regards,

Gerson.

                                          
Re: Help solving equation
Message #12 Posted by Gerson W. Barbosa on 31 Dec 2010, 12:29 a.m.,
in response to message #11 by Gerson W. Barbosa

The following program can be used to compute the second real solution:

 01 LBL 'WM
 02 CHS
 03 1/x
 04 STO 01
 05 ENTER
 06 ENTER
 07 ENTER
 08 LBL 00
 09 STO 02
 10 LN
 11 *
 12 RCL 02
 13 x<>y
 14 -
 15 x=0?
 16 GTO 01
 17 CLx
 18 RCL 01
 19 LASTx
 20 GTO 00
 21 LBL 01
 22 LASTx
 23 RCL 01
 24 /
 25 CHS
 26 END

2 ENTER 32

x<>y LN CHS STO 00 x<>y / XEQ WM RCL 00 / --> 7.999999999 (x2)

2 x<>y y^x LASTx / --> 31.99999998

                                                
Re: Help solving equation
Message #13 Posted by Geir Isene on 1 Jan 2011, 8:18 a.m.,
in response to message #12 by Gerson W. Barbosa

As this should not fade away to oblivion as programs buried deep into an HP Forum thread, I decided to put the two solutions to the W Lambert fuction into one program here:

http://www.isene.com/isene.cgi?hp-41_WL

                                                      
Re: Help solving equation
Message #14 Posted by Gerson W. Barbosa on 1 Jan 2011, 11:41 a.m.,
in response to message #13 by Geir Isene

The program for the second real branch of Lambert's W function above (Wp or W-1)is based on this formula, found quite by chance when playing with the RPN stack:

W-1(-1/x) = -(...x*ln(x*ln(x*ln(x*ln(x))))...)/x

This is not a fast method, especially for arguments close to -1/e, it was originally meant for the HP-12C+:

http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv019.cgi?read=159032

W-1(-0.367) = -1.070791879 (about 5 seconds on the HP-12C+ and 2 min 20 sec on the HP-41CX). Actual 10-digit result: -1.070791887.

A faster method for the second branch should be appreciated.

The steps 05 through 07 in the previous program made sense only for manual calculations. This shorter version is better:

 01 LBL 'WM
 02 CHS
 03 1/x
 04 STO 01
 05 LBL 00
 06 STO 02
 07 LN
 08 RCL 01
 09 *
 10 RCL 02
 11 x<>y
 12 -
 13 x=0?
 14 GTO 01
 15 LASTx
 16 GTO 00
 17 LBL 01
 18 LASTx
 19 RCL 01
 20 /
 21 CHS
 22 END

Edited: 1 Jan 2011, 12:00 p.m. after one or more responses were posted

                                                            
Re: Help solving equation
Message #15 Posted by Geir Isene on 1 Jan 2011, 12:00 p.m.,
in response to message #14 by Gerson W. Barbosa

Check out the updated program listing

                                                                  
Re: Help solving equation
Message #16 Posted by Gerson W. Barbosa on 1 Jan 2011, 12:28 p.m.,
in response to message #15 by Geir Isene

You've been quick! My editing involved checking my result upon Egan's Ford LAMBERTW program for the HP-50g and other minor changes. No changes to the listing have been made. Now, sorry for the dumb question: how to enter STO M, N, on the HP-41? Thanks!

                                                                        
Re: Help solving equation
Message #17 Posted by Thomas Klemm on 1 Jan 2011, 12:52 p.m.,
in response to message #16 by Gerson W. Barbosa

Quote:
how to enter STO M, N, on the HP-41?

Cheers
Thomas

                                                                              
Re: Help solving equation
Message #18 Posted by Gerson W. Barbosa on 1 Jan 2011, 2:42 p.m.,
in response to message #17 by Thomas Klemm

Quote:
  • Just use register 00 and 01 instead of M and N.
  • I'll stick to that :-)

    Thanks,

    Gerson.

                                                                                        
    Re: Help solving equation
    Message #19 Posted by Geir Isene on 1 Jan 2011, 2:55 p.m.,
    in response to message #18 by Gerson W. Barbosa

    Just as well.

    Using registers N and M (part of the Alpha register) saves using standard registers that are often used by other programs.

                                                                
    Re: Help solving equation
    Message #20 Posted by Gerson W. Barbosa on 3 Jan 2011, 8:25 p.m.,
    in response to message #14 by Gerson W. Barbosa

    Quote:
    W-1(-0.367) = -1.070791879 (about 5 seconds on the HP-12C+ and 2 min 20 sec on the HP-41CX). Actual 10-digit result: -1.070791887.

    A faster method for the second branch should be appreciated.


    A much faster program, using the Solver:

     01 LBL 'WW
     02 CHS
     03 STO 01
     04 1/x
     05 LN
     06 ENTER
     07 LN
     08 +
     09 ENTER
     10 ENTER
     11 .5
     12 +
     13 'LL
     14 SOLVE
     15 CHS
     16 END

    01 LBL 'LL 02 e^x 03 / 04 RCL 01 05 - 06 RTN

    -.367 XEQ WW --> -1.070791885 (12 seconds). Actual 10-digit result: -1.070791887.

                                                                      
    Re: Help solving equation
    Message #21 Posted by 聲gel Martin on 4 Jan 2011, 2:41 a.m.,
    in response to message #20 by Gerson W. Barbosa

    WL0 and WL1 are available in the SandMath module. MCODE implementation, not using SOLVE (but internal iteration routine instead).

                                                                            
    Re: Help solving equation
    Message #22 Posted by Geir Isene on 4 Jan 2011, 4:34 a.m.,
    in response to message #21 by 聲gel Martin

    Ah, thanks for that.

    The Sandmath includes just about everything. Should have checked that listing of course.

                                                                            
    Re: Help solving equation
    Message #23 Posted by Gerson W. Barbosa on 4 Jan 2011, 2:12 p.m.,
    in response to message #21 by 聲gel Martin

    Hola 聲gel,

    I'm sure the SandMath module tackles these and other special functions hands down. I'll try it in an emulator, if this is possible. I was never an HP-41 user, mine is used only occasionally.

    Cheers,

    Gerson.

                                                                                  
    Re: Help solving equation
    Message #24 Posted by 聲gel Martin on 5 Jan 2011, 1:03 p.m.,
    in response to message #23 by Gerson W. Barbosa

    Gerson you can use V41 from TOS - it works like a charm.

    Cheers, AM

                      
    Re: Help solving equation
    Message #25 Posted by 聲gel Martin on 29 Dec 2010, 2:40 p.m.,
    in response to message #4 by Geir Isene

    There愀 a WL0 (and WL1 as well) MCODE function in the sandmath, so I悲 suggest you use it to program your own expression and then use the Advantage愀 SOLVE upon it.

    Have you considered taking exponentials on each side of the equation?

    Cheers, 簍

    Edited: 29 Dec 2010, 2:42 p.m.

          
    Math Challenge (was: Help solving equation)
    Message #26 Posted by Geir Isene on 29 Dec 2010, 2:44 p.m.,
    in response to message #1 by Geir Isene

    To elaborate on the task at hand;

    I am looking to see if a business area would benefit from a formalized process.

    A task has the total cost (C) after N repetitions of c*N (where "c" is the cost of doing the task once). If N = n*y (where "n" is the number of times a task is done per year, and "y" is the number of years), we get the total cost of a task done over a certain number of years (or fraction(s) of years):

    C = nyc (pun not intended) [#1]

    If introducing a standardized process for the task gives an efficiency ratio of "E" (a number hopefully between 0 and 1), after the process is introduced we get:

    C = nycE [#2]

    But establishing a process has an initial cost of "I". To recuperate the cost, we get:

    nyc - nycE > IR^y [#3]

    where "R" is the needed return on investment: R = (1 + r/100) where "r" is the percentage needed as annual return on the investment. In some instances the initial cost is recuperated after a certain time, in other cases, the initial cost is never recuperated and a formalized process is not warranted.

    If the task is repeated often and the cost of introducing a process is not too costly, it would be a sound business decision to formalize a process for the task - as is the case with an assembly belt production line. Other more unpredictable and emergent tasks are very seldom repeated and the initial cost is never recuperated.

    The challenge is to solve equation #3 for y. Actually it would be good to create a program that would solve for any variable given the other variables in the equation (as in the Ohms Law program discussion recently).

    I could settle for approximations instead of wild and complex equations as the real world cases are approximations in any case.

    Take this as a math challenge :)

    Any suggestions?

                
    Re: Math Challenge (was: Help solving equation)
    Message #27 Posted by PeterP on 29 Dec 2010, 2:50 p.m.,
    in response to message #26 by Geir Isene

    why dont you just use solve to find the value 'y' for which the left side equals the right side? You can use any number of available 'solve' programs, but probably the MCODE one in AdvantageMod should be just fine. You can even get fancy and use the FOCAL to MCODE program from a module (forgot its name right now) if speed is an issue. That way no fancy math is needed and that's what I probably would do as the required accuracy is probably pretty low and hence convergence would be very fast.

    Cheers

    Peter

                      
    Re: Math Challenge (was: Help solving equation)
    Message #28 Posted by Geir Isene on 29 Dec 2010, 2:54 p.m.,
    in response to message #27 by PeterP

    I would like a direct approach with a symbolic solving of the equation and not to rely on a brute force SOLVE approach.

    Edited: 29 Dec 2010, 2:54 p.m.

                            
    Re: Math Challenge (was: Help solving equation)
    Message #29 Posted by PeterP on 29 Dec 2010, 2:56 p.m.,
    in response to message #28 by Geir Isene

    then wolfram has given you already the symbolic solution of your equation and you can go ahead and program it via one of the numerical procedures mentioned to evaluate W for a particular x. My guess is that this will require a longer and slower Focal program (but I can see the greater appeal in programing the symbolic solution 100%)

    Cheers

    Peter

                                  
    Re: Math Challenge (was: Help solving equation)
    Message #30 Posted by Geir Isene on 29 Dec 2010, 3:06 p.m.,
    in response to message #29 by PeterP

    Right, but I can't get my wits around how to treat the W function in a program - and so I am looking for approximations and creative genius to simplify the (to me) daunting Wolfram answer.

                                        
    Re: Math Challenge (was: Help solving equation)
    Message #31 Posted by Thomas Klemm on 29 Dec 2010, 3:51 p.m.,
    in response to message #30 by Geir Isene

    Try to transform the equation so that you can apply the Lambert W function:

    Substitution:

    No Wolfram Alpha required. QED.

    Best regards
    Thomas

          
    Re: Help solving equation
    Message #32 Posted by Chuck on 29 Dec 2010, 6:20 p.m.,
    in response to message #1 by Geir Isene

    The Lambert-W function can't be written in terms of elementary functions, but may be approximated with a recipe of elementary functions depending on the domain for x you have in mind and the maximum allowable error. Any idea what the domain and error desired is?

    CHUCK

                
    Re: Help solving equation
    Message #33 Posted by Geir Isene on 29 Dec 2010, 7:14 p.m.,
    in response to message #32 by Chuck

    Well, in the equation #3 above, clarified is:

    (nc(1-E))/I > (R^y)/y [4]

    then from my original equation;

    "a" is R

    "b" is (nc(1-E))/I

    A value for y here would have to lie in the area 0-7 for a sound business decision to be made.

                      
    Re: Help solving equation
    Message #34 Posted by Thomas Klemm on 30 Dec 2010, 3:47 a.m.,
    in response to message #33 by Geir Isene

    I assume r > 0, thus a > 1.

    The function

    has a minimum at:

    I suggest you have a look at the graph.

    To get real, positive solutions for

    b has to be bigger than that:

    In this case you will always get two solutions. The bad thing is, that you will lose in the long term: the exponential function outperforms any polynomial.

    So you might want to rethink your model. Why is it that you don't get any interest for what you gain thanks to the more efficient standardized process? At least you could use that to pay back the initial cost.

    Cheers
    Thomas

    Edited: 30 Dec 2010, 10:01 a.m.

                            
    Re: Help solving equation
    Message #35 Posted by Geir Isene on 30 Dec 2010, 11:54 a.m.,
    in response to message #34 by Thomas Klemm

    Quote:
    Why is it that you don't get any interest for what you gain thanks to the more efficient standardized process? At least you could use that to pay back the initial cost.

    Now that is a good point. One should of course accumulate interest on the gain per year after the implemented process...

    Firstly:

    The cost gain per year equals nc - ncE, and that should gain interest:

    (n*c - n*c*E)*R

    times number of years:

    (n*c - n*c*E)*R*y > I*R^y

    And then:

    n*c*(1-E)*R/I > (R^y)/y

    I substitute E = (1-f/100) to make the input in a program more intuitive as "f" would be the percentage of efficiency given by the process. I also substitute R = (1 + r/100) where "r" is the percentage needed as annual return on the investment for a more intuitive use. And to keep with only lower case and to make the initial cost easier to read, I substitute the letter "I" with "i". We get:

    ncf(1+r/100)/100i > (1+r/100)^y/y [or: ncf(1+r/100)/100i > (1+r/100)^y/(1+r/100)y ]

    Seems correct?

    Then it is a matter of applying the Lambert W function to this and we get the result...

                                  
    Re: Help solving equation
    Message #36 Posted by Geir Isene on 30 Dec 2010, 2:53 p.m.,
    in response to message #35 by Geir Isene

    Oops, not correct.

    The compounded interest for the cost saving of the implemented process would actually be:

    We need to divide every element by two as one would only get half the gain of each year as the process gets repeated throughout the year.

    Now, to solve the resulting equation for the value "y" gets to be hell IMO - and beyond my current skills set. Can we simplify/approximate/make a shortcut somewhere?

    Any takers?

                                        
    Re: Help solving equation
    Message #37 Posted by PeterP on 30 Dec 2010, 4:27 p.m.,
    in response to message #36 by Geir Isene

    at the risk of sounding like a broken record - what is so bad about using solve for such real life problems problems? Its fast, short and lets you change and adapt the code to fit the actual problem of your client quickly and easily. Given that you are interested in a real-life answer I simply don't see the benefit in writing an analytical solution that will for sure require some special function for which you need to write a numerical approximation etc etc but that's just me...

    Cheers

    Peter

                                              
    Re: Help solving equation
    Message #38 Posted by Geir Isene on 30 Dec 2010, 4:35 p.m.,
    in response to message #37 by PeterP

    I am starting to lean toward your solution... :-/

    I would like to write a self-contained program, though.

                                                    
    Re: Help solving equation
    Message #39 Posted by Marcus von Cube, Germany on 31 Dec 2010, 3:21 a.m.,
    in response to message #38 by Geir Isene

    Looking at the graph, the function seems to be well behaved so writing the solver (e. g. Newton) yourself should not be the problem. You can even use the analytical derivative instead of an approximation in the algorithm because the function to be solved is known in advance.

          
    Processability (Was: Help solving equation)
    Message #40 Posted by Geir Isene on 31 Dec 2010, 8:53 a.m.,
    in response to message #1 by Geir Isene

    After excellent input here and some pondering and tweaking, I have come to this formula for the processability of a business area (whether an area warrants the formalization of a process):

    • p = initial cost of implementing a process
    • i = interest rate (return) needed for a sound business decision (as a percentage)
    • t = number of time periods (the time period corresponds to "i"; usually yearly)
    • n = number of times a task is done per time period (i.e. the number of times a process would get run per time period)
    • c = cost of doin the task without a formalized process in place
    • f = efficiency benefit from executing the task as a formalized process (as a percentage indicating how much one would benefit from the formalized process)

    As long as one can estimate the initial cost (p) and the process efficiency (f), set the time period - usually yearly, the maximum payback time (t), set the required return (i) and estimate the number of times the process would be repeated per time period [per year] (n), the job of calculating whether the area would yield a profit from introducing a process is pretty straight forward. But if one would attempt to solve for e.g. "t", this gets tough.

    How would I go about using SOLVE to solve this equation for "t"?

    BTW: A short explanation of the elements in the equation: The first part is the initial cost with the compounded interest for the period evaluated. The second part is the economic gain from an implemented process - the gain comes from each repetition of the process and that gain gets compounded interest as well. The total cost of the implementation minus the total gain for the process should be negative to indicate a profit durin the time period one evaluates for.

    Edited: 31 Dec 2010, 11:55 a.m. after one or more responses were posted

                
    Re: Processability (Was: Help solving equation)
    Message #41 Posted by Walter B on 31 Dec 2010, 9:41 a.m.,
    in response to message #40 by Geir Isene

    First, I'd throw away the unnecessary stuff:

    by expressing i and f in real numbers. Then I'd turn back to your question:

    Quote:
    How would I go about using SOLVE to solve this equation for "t"?
    Well, I have to admit I don't know how you would go about that ... d;->
                      
    Re: Processability (Was: Help solving equation)
    Message #42 Posted by Geir Isene on 31 Dec 2010, 11:44 a.m.,
    in response to message #41 by Walter B

    :)

    Well, those elements are unnecessary. But... It's a matter of using the numbers most familiar to a business person ("i" and "f" being percentages and all).

                
    Re: Processability (Was: Help solving equation)
    Message #43 Posted by Marcus von Cube, Germany on 31 Dec 2010, 12:41 p.m.,
    in response to message #40 by Geir Isene

    If you'd expect to be t a non integer, I must admit I don't have a solution but with t being a (hopefully small) positive integer you can just compute the part left of the "-" by repetitive multiplication and the sum by repetitive addition until the condition is met. You'll do n additions per multiplication.

    If you want the result to be exact to the level of single instances of the process, just stop the summation as soon as the condition is met even if j is below n*t. j is then the total number of process executions for the break even.

                
    Re: Processability (Was: Help solving equation)
    Message #44 Posted by Thomas Klemm on 2 Jan 2011, 12:23 p.m.,
    in response to message #40 by Geir Isene

    Though I'm not familiar with your business process I guess the interest of the economic gain is payed at the end of the time period and not when the task is done. So in fact you have a variant of an ordinary "time value of money" (TVM) problem with the following payment at the end of the period (year):

    The interest rate i in this formula is already divided by 100 as suggested by Walter.

    The present value PV corresponds to your initial cost of implementing a process while the future value FV = 0 (break-even). Most solvers (e.g. HP-12C, HP-48GX, ...) use n for the number of time periods. So take care because you use this variable for the number of tasks (and that's also the meaning in my formula above). It might be better to use another variable instead.

    It appears that the Advantage module contains a TVM-solver adapted from Finance Pac. So you can use either of these.

    Best regards
    Thomas

    Edited: 2 Jan 2011, 12:40 p.m.

                
    Re: Processability (Was: Help solving equation)
    Message #45 Posted by Geir Isene on 3 Jan 2011, 1:02 p.m.,
    in response to message #40 by Geir Isene

    Thanks for the input, guys - it's highly appreciated. I have now concluded with the following formula:

    • p = initial cost of implementing a process
    • i = interest rate (return) needed for a sound business decision (as a percentage)
    • n = number of time periods (the time period corresponds to "i"; usually yearly)
    • r = number of repetitions of the task per time period (i.e. the number of times a process would get run per time period)
    • m = maintenance cost of having the process in place per time period (knowledge management cost, training cost)
    • c = cost of doing the task without a formalized process in place
    • f = efficiency benefit from executing the task as a formalized process (as a percentage indicating how much one would benefit from the formalized process)

    With this, we now have a complete formula to identify whether it is an economically sound decision to formalize a process in a business area.

                      
    Re: Processability (Was: Help solving equation)
    Message #46 Posted by Walter B on 3 Jan 2011, 1:13 p.m.,
    in response to message #45 by Geir Isene

    Watch out, this formula won't work with values entered as percenteages. Use real values instead.

                            
    Re: Processability (Was: Help solving equation)
    Message #47 Posted by Geir Isene on 3 Jan 2011, 1:26 p.m.,
    in response to message #46 by Walter B

    I know. I took your advice :)

                      
    Re: Processability (Was: Help solving equation)
    Message #48 Posted by Thomas Klemm on 3 Jan 2011, 2:44 p.m.,
    in response to message #45 by Geir Isene

    Still I think the 3rd term in your equation is wrong.

    Taking the additional maintenance cost into account I get:

    From your formula I assumed m is paid at the end of the time period.

    Then I used this formula for TVM calculations:

    This may be simplified since FV = 0:

    In your case PV and PMT have different signs:

    That's what I end up with:

    Now all you have to do is solve this equation for n. You're lucky! This can be done symbolically.

    Best regards
    Thomas

    Edited: 3 Jan 2011, 2:53 p.m.

                            
    Re: Processability (Was: Help solving equation)
    Message #49 Posted by Geir Isene on 3 Jan 2011, 3:51 p.m.,
    in response to message #48 by Thomas Klemm

    The reason I think the third term is correct is that for every time the process is run, one gets the profit "cf", but from then on and out until r*n, one will accrue interest on that one profit. The first profit will result in a total profit of cf(1+i/r)^(nr-1), the next process run will result in a profit with accrued interest of one less, i.e. cf(1+i/r)^(nr-2), all the way until the last process run which will accrue only cf as profit (which means that my third term is actually a tad wrong as it should be summed from j=0 [not j=1] until (nr-1). All those profits with accrued interests are summed up for a total of the process gain over the time periods n.

    I have updated the formula above to correct the error found.

                                  
    Re: Processability (Was: Help solving equation)
    Message #50 Posted by Thomas Klemm on 3 Jan 2011, 5:49 p.m.,
    in response to message #49 by Geir Isene

    It all depends on when the interest is paid: if it's at the end of the process I agree with you. But that's not how the banks I know handle it: the interest is usually paid at the end of the year. The interest is proportional to the time and of course the interest rate. The annual temporal ratio of the first process is (r-1)/r while the last process (still of the first year) doesn't get any interest. Assuming the process is run monthly then r = 12 and the first process gets interest for 11 months and the last process gets none. If you sum all this up you get the annual payment PMT. Only from now on you get compound interest every year. It's up to you to decide whether to subtract the maintenance m once at the end of the year (as I did) or monthly. In the latter case the formula will slightly change.

    You might also ignore this consideration altogether and use PMT = cfr - m instead if you're just interested in a rough approximation of n. As long as i << 1 and n is not too big it should still be quiet accuarate.

    I hope I could clarify my objection.

    Kind regards
    Thomas

    Bonus question:
    What happens with your 3rd expression when r gets bigger and bigger but still the annual cost cr is constant?

                                        
    Re: Processability (Was: Help solving equation)
    Message #51 Posted by Geir Isene on 4 Jan 2011, 1:30 a.m.,
    in response to message #50 by Thomas Klemm

    Yes, you did clarify your objection.

    However, from a business viewpoint, you get compounded interest for every process gain as the alternative is not to put the money in the bank (as very few businesses do for investment). The alternative is to invest the money otherwise in the business that would get (also) immediate return/profit.

    Do you agree that the formula is correct given that interest is calculated from every process repetition?

    Edited: 4 Jan 2011, 2:10 a.m.

                                        
    Re: Processability (Was: Help solving equation)
    Message #52 Posted by Thomas Klemm on 4 Jan 2011, 4:08 a.m.,
    in response to message #50 by Thomas Klemm

    Quote:
    You might also ignore this consideration altogether and use PMT = cfr - m instead if you're just interested in a rough approximation of n.

    Of course you want to use LN1+X to calculate that with your HP-41. This should also be a good initial value for a solver of your equation.

    Cheers
    Thomas

    Edited: 4 Jan 2011, 4:25 a.m.

                            
    Re: Processability (Was: Help solving equation)
    Message #53 Posted by Geir Isene on 4 Jan 2011, 3:57 a.m.,
    in response to message #48 by Thomas Klemm

    Rethinking this, I believe you are right - it would be the usual business optimism that interests are accrued after each gain (that would be the maximum of the gain, but not a realistic one). So, unless you have something to add to your formula above, I think we can conclude that your equation is the final answer for this chapter.

    The next chapter would be to add Risk Management to the equation; We simply RCS to cf to obtain the gain from each process run, where R is the risk of the task going wrong (real number), C is the cost when/if it goes wrong and S is the security offered by the process (a real number between 0 and 1, where 0.1 indicates a 10% security added by the process). Thus, given that a task has 0.001 chance of failure and the corresponding average cost of such failure is 10000, the added risk cost per task is then 10. If a process would help the security of the process by 10%, the added value of doing the task via a formalized process is then 0.001*10000*0.1 = 1.

    I use capital letters for RCS as it indicates a more "virtual" gain through Risk Management.

    Viewpoints?

    Edited: 4 Jan 2011, 7:31 a.m. after one or more responses were posted

                                  
    Re: Processability (Was: Help solving equation)
    Message #54 Posted by Geir Isene on 4 Jan 2011, 4:29 a.m.,
    in response to message #53 by Geir Isene

    And would you agree that the break-even of the equation would be:

                                        
    Re: Processability (Was: Help solving equation)
    Message #55 Posted by Geir Isene on 4 Jan 2011, 12:31 p.m.,
    in response to message #54 by Geir Isene

    This equation is easy to solve for all variables, except "i". I'm up against a brick wall on that one.

                                              
    Re: Processability (Was: Help solving equation)
    Message #56 Posted by Thomas Klemm on 4 Jan 2011, 1:51 p.m.,
    in response to message #55 by Geir Isene

    cf. Calculating i

    Not the solution but shows the way to go.

                                  
    Re: Processability (Was: Help solving equation)
    Message #57 Posted by Thomas Klemm on 4 Jan 2011, 7:49 a.m.,
    in response to message #53 by Geir Isene

    What's the meaning of $^2 (or NOK^2) when you multiply cost c with cost C?

                                        
    Re: Processability (Was: Help solving equation)
    Message #58 Posted by Geir Isene on 4 Jan 2011, 7:59 a.m.,
    in response to message #57 by Thomas Klemm

    Sorry, changed it to addition, not multiplication - there is an economic gain from efficiency of the process and there is a "virtual" economic gain from the process minimizing failure of the task. Added, not multiplied. Thus, one could justify implementing a process purely from a security perspective or an efficiency perspective or both.

                      
    Re: Processability (Was: Help solving equation)
    Message #59 Posted by Thomas Klemm on 4 Jan 2011, 2:23 a.m.,
    in response to message #45 by Geir Isene

    Still you can use:

                            
    Re: Processability (Was: Help solving equation)
    Message #60 Posted by Geir Isene on 4 Jan 2011, 3:18 a.m.,
    in response to message #59 by Thomas Klemm

    True. And nice.

    But how do you account for p(1+i)^n?

    I mean, one would get compounded interest over n periods for the initial investment if one would rather invest that cost into something else.


    [ Return to Index | Top of Index ]

    Go back to the main exhibit hall