MASTERSHEET
Copy/Paste Formulae for Chapter 5

>Copy the formula you need
>Paste it into the other workbook you are using
>Type into the pink boxes as instructed in your other workbook
>NOTE: Do NOT alter the formulae in this workbook, these are your templates only.

1. Substitution of values into a formula

Solve["Enter equation here",Unknown Variable]

Note: Equation has to be two equal signs e.g. y==2x+10

Example:

Solve[20==2x+10,x]

2. Display a table of points from an equation/Constructing a table of values

TableForm[Table[{x,"Enter equation here"},{x,0,10,variable width}],TableHeadings->{None,{"x","y"}},TableDirections->Row]

Example:

TableForm[Table[{C,F=95C+32},{C,0,10}],TableHeadings->{None,{"C","F"}},TableDirections->Row]

TableForm[Table[{r,c=2*π*r},{r,0.0,1.0,0.1}],TableHeadings->{None,{"r","c"}},TableDirections->Row]

3. Solving linear equations with one unknown

Solve["Enter equation here",Unknown Variable]

4. Solving Simultaneous Equations

Solve[{equation here number one,another equation here},{variable1,variable2}]

Example:

Solve[{2x+3y==6,x-2y==4},{x,y}]//N

5. Finding the slope of a line when given two points (x1,y1) and (x2,y2) along the line

Solve[Slope==(((Subscript[y, 2])-((Subscript[y, 1])))/((Subscript[x, 2])-((Subscript[x, 1]))))]//N

Example
Find the slope of the line that passes through the points (0,3) and (2,2)

Solve[Slope==((2-(3))/(2-(0)))]//N
{{Slope->-0.5`}}
Therefore the slope of the line is -0.5

6. Finding the equation of the line from two points (x1,y1) and (x2,y2) along the line

lm=LinearModelFit[{{(Subscript[x, 1]),(Subscript[y, 1])},{(Subscript[x, 2]),(Subscript[y, 2])}},x,x]
Print["Equation:    y = ",Normal[lm]]

Example
Find the equation of the line that passes through the points (0,3) and (2,2)
lm=LinearModelFit[{{0,3},{2,2}},x,x]
Print[“Equation:    y = “,Normal[lm]]
FittedModel[3.` -0.5` x]
Equation: y = 3 - 0.5x

7. Predict a value from a line when given two points (x1,y1) and (x2,y2) along the line

lm=LinearModelFit[{{(Subscript[x, 1]),(Subscript[y, 1])},{(Subscript[x, 2]),(Subscript[y, 2])}},x,x]
Print["Equation:    y = ",Normal[lm]]
Print["y = ",lm["value you are predicting for"]]

Example
Find the equation of the line that passes through the points (0,3) and (2,2)
Predict the value of y when x = 3 using this line

lm=LinearModelFit[{{0,3},{2,2}},x,x]
Print["Equation:    y = ",Normal[lm]]
Print["y = ",lm[3]]

8. Predict a value from a given equation

"Enter equation here"/.x->"value for prediction"

Example
Predict the value of x = 3 for the equation y = 3 - 0.5x
y=3-0.5x/.x->3
1.5`

9. Rearrange an equation

Expand[Solve["left side of equation"=="right side of equation","What are we solving for?"]]

Expand[Solve[3x+2y==8,y]]

10. To plot few graphs Gradient Y-intercept Form on the same plane

Plot[{"function1","function2","function3"},{x,"Minimum","Maximum"},PlotLegends->"Expressions"]

Plot[{Sin[x],Sin[2x],Sin[3x]},{x,0,2Pi},PlotLegends->"Expressions"]

11. To plot few Circles/ Standard Form

ContourPlot[{"fisrt circle","second circle","third circle"},{x,"Minimum","Maximum"},{y,"Minimum","Maximum"},PlotLegends->"Expressions"]

ContourPlot[{(x^2)+(y^2)==4,(((x-1))^2)+(((y-2))^2)==9,(x^2)+(((y-3))^2)==4},{x,-5,5},{y,-5,5},PlotLegends->"Expressions"]

12. To plot Piecewise Graph

Plot[Piecewise[{{"function1","range for function 1, e.g. 0<=x<3"},{"function2","range for function 2, e.g. 3<=x<6"}}],{x,"Minimum","Maximum"}]

Plot[Piecewise[{{x^2,x<0},{x,x>0}}],{x,-2,2}]