How to Create a Savings Interest Calculator with Mathematica?

In summary, the conversation is about creating a calculator in Mathematica that can graphically represent the relationship between savings, interest, and time using a specific formula. The person is having trouble making a list or table to show the accumulated sum at certain times, but they have added code using Manipulate and ListLinePlot to try and solve the problem. The person also mentions adjusting values for frequency, initial investment, added contributions, growth rate, and number of years.
  • #1
Lobotomy
58
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
  • #2
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]
 

1. What is Mathematica calculator?

Mathematica calculator is a powerful computational software program used by scientists, mathematicians, and engineers to perform complex mathematical calculations, visualizations, and analyses. It is developed and maintained by Wolfram Research and is widely used in various fields such as physics, chemistry, biology, and engineering.

2. How does Mathematica calculator work?

Mathematica calculator uses advanced algorithms and symbolic computation to solve mathematical problems. It has a built-in collection of mathematical functions and formulas, as well as the ability to create custom functions. Users can input mathematical expressions, equations, and data, and the software will evaluate and generate solutions or visualizations.

3. Can Mathematica calculator perform calculations in different mathematical areas?

Yes, Mathematica calculator is designed to handle a wide range of mathematical areas such as algebra, calculus, linear algebra, statistics, and more. It also has specialized packages for specific fields such as physics, chemistry, and finance.

4. Is Mathematica calculator user-friendly?

Mathematica calculator has a user-friendly interface with various input options, including a command line, a notebook interface, and a graphical user interface. It also has a comprehensive help system and documentation to guide users in performing calculations and using advanced features.

5. Is Mathematica calculator available for different operating systems?

Yes, Mathematica calculator is available for various operating systems such as Windows, Mac, and Linux. It also has a web-based version called Wolfram Alpha that can be accessed from any internet-connected device.

Similar threads

Replies
3
Views
1K
  • General Math
Replies
1
Views
2K
  • General Math
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
927
Replies
1
Views
2K
  • Calculus and Beyond Homework Help
Replies
12
Views
1K
  • General Math
Replies
3
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
5K
Replies
5
Views
2K
  • Precalculus Mathematics Homework Help
Replies
1
Views
1K
Back
Top