Page 1 of 1 [ 7 posts ] 

unknownfactor
Raven
Raven

User avatar

Joined: 8 Apr 2013
Gender: Male
Posts: 107

18 May 2014, 10:01 pm

Okay, weird question. Are mutable variables a form of calculus?

Here's my logic.
1. Mutable variables in programming can change.
2. Algebra variables seem to never change. (just transform, reduce, cancel, ect)
3. Calculus is the study of change.
4. A mutable programming variable cannot hold multiple things at the same time.
5. Since a mutable variable "changes" with respect to time, it is therefore calculus.

Is there any flaw to this thinking? Chances are I'm way off on something and could use a correcting.



Numbuh4
Tufted Titmouse
Tufted Titmouse

User avatar

Joined: 11 Feb 2013
Age: 25
Gender: Female
Posts: 48

18 May 2014, 11:19 pm

I'm not a math genius (well, people say I am, but I'm not that advanced, just really advanced for my age) and there is a multivariable calculus. It's after calculus BC.



LoveNotHate
Veteran
Veteran

User avatar

Joined: 12 Oct 2013
Gender: Female
Posts: 6,195
Location: USA

19 May 2014, 3:06 am

In calculus we find the "tangent line" to find the change in the slope occurring for a function at a point.

The "change" being measured is ...

Image

This would not appear to have anything to do with "mutation of variables".


_________________
After a failure, the easiest thing to do is to blame someone else.


MrOddBall
Velociraptor
Velociraptor

User avatar

Joined: 3 Feb 2014
Age: 125
Gender: Male
Posts: 426
Location: Here, there, and everywhere

19 May 2014, 3:51 am

Is There a Math to Mutable Variables?

... No there isn't, sorry ...



unknownfactor
Raven
Raven

User avatar

Joined: 8 Apr 2013
Gender: Male
Posts: 107

19 May 2014, 6:45 am

Numbuh4:
I've never seen multivariable calculus. In college, I've only been up through Calc 2 and a proofs course. I'll have to check out some videos on multivar know that you've got me curious about that.

LoveNotHate:
The change for a slope is a change in Y with respect to the independent variable X for a function at a point.
So in a program with a mutable variable, you get something like this typically:

y = 1
y = 4

In a programming context, the independent variable would be t. (for time) And that's probably where my mental mapping from mutable variables to calc goes wrong. The independent variable isn't being accounted for with mutable variables so representing them with any kind of rate of change slope becomes impossible.

MrOddBall
It seems you're right which is kind of a shame. My own personal biases want to see math in everything. On a drive to my therapist, I was wishing to see algebra in the structure of my engine, geometry in the shape of my car body, calculus in the speed I was going to get there, and statistics in my likelihood of getting there on time.

And so I naturally wish I could see math in whatever future Java / Python / whatever job I get sometime down the road. But I also don't mind calling wishful thinking for what it is.



eric76
Veteran
Veteran

User avatar

Joined: 31 Aug 2012
Gender: Male
Posts: 10,660
Location: In the heart of the dust bowl

19 May 2014, 3:17 pm

By "mutable variable", I assume you are referring to an object in a computer program that can be changed during the execution of the program. In contrast, an "immutable variable" would be either a constant or an object that could be set when created and then not changed at all.

I'm not sure why this would require any special mathematics.



ruveyn
Veteran
Veteran

User avatar

Joined: 21 Sep 2008
Age: 88
Gender: Male
Posts: 31,502
Location: New Jersey

19 May 2014, 6:53 pm

Most likely mutable objects can be described by a Category. Look up Category theory.

ruveyn