How to Create a Savings Interest Calculator with Mathematica?

Lobotomy
Messages
55
Reaction score
0
Hello. I just started to learn mathematica a few days ago. I am trying
to make a calculator that can graphically represent the relationship
between:

savings
interest
time

the mathematical formula I am using you can see below.

this is what I've written sofar...







Manipulate[


**%% Here i would like to make a "ListLinePlot" using this function:
(this is the formula for my calculations)

(#1*(1 + #2/#3)^(#3*#4) - 1)/(#2/#3) &[d, g, f, n]


then I would like to use the below controlls to manipulate the values
of d,g,f and n. How is this done?

I understand that there has to be some kind of list or table that
contains the accumulated sum at certain times. But I have no clue how
to make this list. The problem with my function is that it only
calculates the correct final answer. for example

"if i invest 1000€ per month with 5% interest for 8 years, what is the
accumulated sum?"



GridLines -> Automatic,



{{f, 1, "Frequency"}, {1 -> "Annually", 1/4 -> "Quarterly",
1/12 -> "Monthly"}},
Delimiter,



{{a, 5000, "Initial Investment"}, 0, 10000000, 1000,
Appearance -> {"Open", "Labeled"}},

{{d, 0, "Added Contributions/yr"}, -500000, 500000, 1000,
Appearance -> {"Open", "Labeled"}},

{{g, 0.05, "Growth(%/100)"}, 0, 1, 0.05,
Appearance -> {"Open", "Labeled"}},

{{n, 5, "Years"}, 1, 100, 1, Appearance -> {"Open", "Labeled"}},



ControlPlacement -> Left]
 
Mathematics news on Phys.org
I've added this into at the top, just below Manipulate in the code:L1 = Table[(#1*((1 + (#2/#3))^(#3*x) - 1))/(#2/#3) &[a, g, f, x], {x,
0, n}]
L2 = Table[x, {x, 0, n}]

ListLinePlot[{L1, L2}, DataRange -> {0, n},I think I am on the way to the right solution but it doesn't really work... this is my entire code:

Manipulate[

L1 = Table[(#1*((1 + (#2/#3))^(#3*x) - 1))/(#2/#3) &[a, g, f, x], {x,
0, n}]
L2 = Table[x, {x, 0, n}]

ListLinePlot[{L1, L2}, DataRange -> {0, n},



GridLines -> Automatic,


Delimiter,



{{f, 12, "Frequency of contributions"}, {1 -> "Annually",
1/4 -> "Quarterly", 1/12 -> "Monthly"}},
Delimiter,



{{d, 5000, "Initial Deposit"}, 0, 10000000, 1000,
Appearance -> {"Open", "Labeled"}},

{{a, 100, "Added Contributions"}, -500000, 500000, 1000,
Appearance -> {"Open", "Labeled"}},

{{g, 0.05, "Growth(%/100)"}, 0, 1, 0.05,
Appearance -> {"Open", "Labeled"}},

{{n, 5, "Years"}, 1, 100, 1, Appearance -> {"Open", "Labeled"}},



ControlPlacement -> Left]
 
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
I'm interested to know whether the equation $$1 = 2 - \frac{1}{2 - \frac{1}{2 - \cdots}}$$ is true or not. It can be shown easily that if the continued fraction converges, it cannot converge to anything else than 1. It seems that if the continued fraction converges, the convergence is very slow. The apparent slowness of the convergence makes it difficult to estimate the presence of true convergence numerically. At the moment I don't know whether this converges or not.
Back
Top