Wednesday, February 4, 2009

View the BMCC video

http://www.bmcc.cuny.edu/news/news.jsp?id=590

Tuesday, February 3, 2009

A review of your basic algebra skills using Mathematica 7 is available in a related file.
It is important that you can understand the meaning of a line.
The equation relates variable x (horizontal axis) to y (vertical axis) with a line given by the equation:

y = a + b x

a provides the distance that the line intersects to the vertical axis.
If a is negative then the intersection is below the origin point (0,0),
if a is zero then it crosses the origin point (0,0), and
if a is positive then the line intersects to the vertical axis above the origin point.
This magnitude provides the value of y that is independent of any value of x, in other ways when b is zero.

If b is zero, the equation is reduced to y = a.
If b is positive, then the line has an upward slope.
That means that as the a increases, so y, and the value of b, the slope of the line indicates how x affects y. If the slope is 45o then any change of x results equal change in y.
If the slope is greater than 45o, any change of x results greater change in y, while if the slope is less than 45o, the change of x results smaller change in y.
If b is negative, then the line has a downward slope.
That implies substitution, as the value of x increases, the value of y decreases.


Manipulate[Plot[a + b x == c, {x, -10, 10}],
{a, -20, 20}, {b, -.01, .6}, {c, -10, 10}]



When we move from a 2D to 3D we have:

y = a + b x + c z

Manipulate[Plot3D[a + b x + c z == 0, {x, -10, 10}, {z, -10, 10}],
{a, -20, 20}, {b, -5, 5}, {c, -5, 5}]

Now we do not have a line but a surface plane.
You can play around using the Manipulate command in Mathematica, so you can verify the change on the plane's position when coefficients a, b, & c change.

When the dependent variable is not in its simple (linear) form that indicates that x affects y in a proportional way, the relationship becomes non linear, i.e. non proportional.
This meas that either the variable x interrelates to itself, becoming x*x or x^2.
Then we have a second degree polynomial.

y = a + b x + c x^2

Manipulate[Plot[a + b x + c x^2 == 0, {x, -5, 5}],
{a, -20, 20}, {b, -10, 10}, {c, -50, 50}]

In a three dimensional form we may have a case that one variable affect the other.
Then we have the case

y = a + b x * c z => y = a + (bc) x*z

Manipulate[Plot3D[a + b x c y == 0, {x, -10, 10}, {y, -10, 10}],
{a, 0, 20}, {b, -5, 5}, {c, -5, 5}]

This implies that the surface bends. The opposite type of a bend we have whenever we have a division as:

y = a + ( b x / c z )

Manipulate[Plot3D[a + b x / c y == 0, {x, -10, 10}, {y, -10, 10}],
{a, 0, 20}, {b, -5, 5}, {c, -5, 5}]

The general case in the three dimensional relationship is:

y = a + b x + c x^2 + d x z + e z^2 + f z

Manipulate[Plot3D[a + b x + c x^2 + d x y + e y^2 + f y == 0, {x, -10, 10}, {y, -10, 10}], {a, -200, 200}, {b, -50, 50}, {c, -10, 10}, {d, -100, 100}, {e, -10, 10}, {f, -50 , 50}]

Manipulate[
Plot[a + b x + c x^2 + d x^3 == 0, {x, -1, 1}], {a, 0, 20}, {b, -10,
10}, {c, -5, 5}, {d, -20, 20}]

Manipulate[Plot[a + b x + c x^2 + d x^3 + e x^4 == 0, {x, -1, 10}],
{a, 0, 20}, {b, -10, 10}, {c, -5, 5}, {d, -20, 20}, {e, -3, 3}]

Then you can practice to see the planes defined on page 19 using:

Plot3D[3 x + 4 y == 18, {x, -10, 10}, {y, -20, 20}]

and

Plot3D[9 x + y == 21, {x, -10, 10}, {y, -20, 20}]

Then you can solve the system of these two equations by:

Solve[{3 x + 4 y == 18, 9 x + y == 21}, {x, y}]

and have its solution.

{{x -> 2, y -> 3}}

Finally, you can control the relationships on page 39 as:

Manipulate[Plot[a x ^b == 0, {x, -1, 1}], {a, -20, 20}, {b, -6, 6}]

on page 41:

Manipulate[Plot[a + b x , {x, 0, 10}], {a, 0, 20}, {b, 0, .99}]

Manipulate[Plot[a * x^b , {x, 0, 10}], {a, 0, 20}, {b, 0, .99}]

Manipulate[Plot[a * E^(-b x) , {x, 0, 10}], {a, 0, 20}, {b, 0, .99}]

Manipulate[Plot[a * (1 - E^(-b x)) , {x, 0, 10}], {a, 0, 20}, {b, 0, .99}]

Manipulate[Plot[a x ^b == 0, {x, 0, 10}], {a, 0, 20}, {b, 1, 5}]

Manipulate[Plot[a x ^b == 0, {x, 0, 10}], {a, 0, 20}, {b, -6, .99}]


Finally, if you want to indicate an influence diagram yoou may use:


LayeredGraphPlot[{"Price" -> "Revenue", "Revenue" -> "Profit",
"Advertising" -> "Units Sold", "Advertising" -> "Cost",
"Units Sold" -> "Revenue", "Seasonal Factors" -> "Units Sold",
"Unit Cost" -> "Cost of Goods", "Cost of Goods" -> "Cost",
"Sales Expence" -> "Cost", "Overhead" -> "Cost" ,
"Cost" -> "Profit"}, Left, VertexLabeling -> True]