Post Reply 
Functions Created in CAS - My Insights
02-17-2014, 10:39 AM (This post was last modified: 02-17-2014 03:32 PM by CR Haeger.)
Post: #11
RE: Functions Created in CAS - a few financial formulas and applications
Perhaps there should be a new thread for CAS programs?

After Joe showed us how to quickly create/save CAS programs, I spent some time seeing where they can/may not be used on the Prime. Here are some financial formulas I transcribed from an Engineering Econ chapter:

F_A(rate,per):=((1+rate)^per-1)/rate;

F_P(rate,per):=(rate+1)^per;

P_A(rate,per):=((1+rate)^per-1)/(rate*(1+rate)^per);

P_G(rate,per):=((rate+1)^per-1)/(rate^2*(rate+1)^per)-per/(rate*(rate+1)^per)


As others have noted, at this point it may be best for you to copy/paste the above into the CK in a new note, say "CAS Formulas". From there, if you send to the emulator or your handheld, they can be copy/pasted into a CAS command line then ENTER to save the CAS variable (program).

So far, it seems to me that these CAS variable (programs) can be used for;
1. Calculating a value based on numerical variable inputs (from Home or CAS): F_A(0.1,10)=15.94
2. Showing expression variable(s) while in CAS: F_A(rate,10) shows F_A in terms of rate with periods set to 10.
3. Expression arithmetic while in CAS: F_P(rate,per) * P_G(rate,per) yields an expression for F_G(rate, per) in this case.
4. Can use many CAS Toolbox commands, like solve(), diff(), zeros(): solve(F_A(0.1,per)=20,per) {11.52} or ~11.5 periods at 10% interest will yield a future 20x the investment per period.
5. Can be used/referred to in a Spreadsheet APP: =F_A(cellref1, cellref2) will calculate F_A for the rate, per you enter in cellrefs 1,2.
6. Can be transferred to Function APP to graph versus rate or per: f(x):= F_A(.1,x) then Function.F1:=f stores F_A(0.1,X) in F1 for plotting*.
7. You can transfer to Solver APP using say E1:=F_A(rate,per). From there though, its a little tricky in the Solver App. Create user vars, change expression to an equation, solve, delete user vars.... May not be worth the effort.

* This stores F_A(0.1,X) in F1. Excecute F_A(0.1,x) first in CAS if you want the expression saved.
** I have not yet tried calling these from a program I think it would be powerful if this works.

I look forward to seeing what others have done with CAS variables (programs). Maybe this is/was common with the HP50G but for me, coming from the 15C this seems pretty powerful.

Best,
Carl
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Functions Created in CAS - a few financial formulas and applications - CR Haeger - 02-17-2014 10:39 AM



User(s) browsing this thread: 2 Guest(s)