Problem 6: Because I do my algebra by hand, I hard-code it into my programs,
and then it takes me a long time to adjust later.
Solution: Let Mathematica take care of the algebra.
Interactive, interpreted system
Mathematica is an interpreted, interactive system in which, on a fundamental
level, all of its operations share the same basic infrastructure.
Flexibility from the shared infrastructure
This shared infrastructure gives the user a level of flexibility that's unmatched in,
frankly, the entire world of software.
Formulas and functions built step by step
One of the benefits of this approach is that it allows you to build up large formulas
that interact in complicated ways in a step-by-step manner, a bit at a time, without
continually having to discard previous work.
Examples
Let's define a simple function and also another function that uses the first one.
![[Graphics:Images/index_gr_61.gif]](Images/index_gr_61.gif)
![[Graphics:Images/index_gr_62.gif]](Images/index_gr_62.gif)
So g
uses f
in its definition. Let's try it out.
![[Graphics:Images/index_gr_65.gif]](Images/index_gr_65.gif)
![[Graphics:Images/index_gr_66.gif]](Images/index_gr_66.gif)
If we change the definition of f now...
![[Graphics:Images/index_gr_67.gif]](Images/index_gr_67.gif)
...it's not necessary to alter the function g, which
uses it; the change to f automatically propagates
through the system without any additional need to recode.
![[Graphics:Images/index_gr_68.gif]](Images/index_gr_68.gif)
![[Graphics:Images/index_gr_69.gif]](Images/index_gr_69.gif)
|