Math 1483 - Quiz 1

-=Solutions=-

Remember, ALT+7 gives a new text cell, be sure to explain your answers, if needed!

Problem 1

Let x = (0.1^0.00000001), y = (1.0001^0.001), and z = (e^0.000001) .  Determine the order of these three numbers on the number line, ordering from least to greatest.

We can simply use the  < relation on the numbers, there are 6 possible ways to order x, y, and z.  The correct ordering is x < y < z.

x = (0.1^0.00000001);
y = (1.0001^0.001);
z =  (E^0.000001);

x< y < z

x < z < y

y < z < x

y < x < z

z < y < x

z < x < y

Addendum: A student came up with the idea of using the NumberLinePlot. Cool idea!

NumberLinePlot[{{x},{y},{z}},PlotLegends->{"x","y","z"}]

Problem 2

Consider the function Q(x) =3(x^2)-3x-2

Part 1

Define Q(x) in Mathematica using proper function notation.

Q[x_]:=3(x^2)-3x-2

Part 2

Plot Q(x) for -2 <=  x <=  3.

Plot[Q[x],{x,-2,3}]

Part 3

Find the x-values for which Q(x) = 0 using the Solve command.

Solve[Q[x]==0,x]

Part 4

Numerically approximate the solutions you found in Part 3 using the NSolve command.

NSolve[Q[x]==0,x]

Part 5

Graph both the function Q(x) and the the points where Q(x) =0 on the same graph.  Note:  you will most likely want to use the ListPlot command, and the Show command.  Be sure that your graph displays all the important information.

RootPlot = ListPlot[{{-0.4574271077563381`,0},{1.457427107756338`,0}}, PlotStyle->Blue, PlotMarkers->{"★",16}];

QuadPlot = Plot[Q[x],{x,-2,3}, PlotStyle->{Red, Thickness[0.005]}];

Show[RootPlot,QuadPlot, PlotRange->{{-2,3},{-5,20}}]

Problem 3

Consider the function F(x) =((((2x-1))^(1/2))/(((12+x))^5))+ (Sqrt[5x+3])-4

Clear[x]
Clear[y]
Clear[z]

Part 1

Define F(x) in Mathematica using proper function notation.

F[x_]:=(2x-1)^(1/2)/(12+x)^5+Sqrt[5x+3]-4;

Part 2

Use the Table command to create a list of the function F(x) for the values x=1, 2, 3, 4, 5

FTable = Table[F[x],{x,1,5}]

Part 3

Numerically approximate the list you created in Part 2.

N[FTable]

Part 4

Graph the function F(x) for 1 < x < 50.

Plot[F[x],{x,1,50}]

Problem 4

Let G(x) = -8+6 x-2 (x^3)+(x^4)+3 (x^5), and H(x) = 2 x-10 (x^2)-(x^3)+5 (x^4)+4 (x^5).

Clear[x];
Clear[G];
Clear[H];

Part 1

Find ALL the values of x for which G(x) = H(x).

G[x_] = -8+6 x-2 (x^3)+(x^4)+3 (x^5)

H[x_] = 2 x-10 (x^2)-(x^3)+5 (x^4)+4 (x^5)

Solve[G[x]==H[x],x]

The solutions are x=-2 and x=1.

Part 2

Determine algebraically the values of x for which G(x) > H(x).  Express your answer in interval notation! (Hint: The Reduce function is your friend)

We used the reduce function, and remember that || is the Mathematica version of “or”.

Reduce[G[x]>H[x],x]

So x < -2. In interval notation, this is (-∞,-2).

Part 3

Plot the functions G(x) and H(x) on the same graph, where the graph of  G(x) is magenta in color, and H(x) is cyan in color.  Be sure to plot on a domain which contains all the points of intersection between the two functions.  Also, you will have to set the range so that the intersections are discernable on the graph.

The real roots all lie between x=-3 and x=2, (i.e. 1 unit to the left of the left-most root, and 1 unit to the right of the right-most root), and we use the PlotRange option to specify the y-values as well.

Fplot1 = Plot[{G[x],H[x]},{x,-3,3}, PlotStyle->{Magenta, Cyan},  PlotRange->{{-3,3},{-105,25}}, PlotLegends->{"G(x)","H(x)"}]

Part  4

Add a plot of the two intersection points of  G(x) and H(x) to the graph from Part 3 to produce a new graph which contains both functions  and now the two points of intersection.  Pick an icon from:

https://reference.wolfram.com/language/guide/ShapesIconsAndRelatedCharacters.html

which is NOT “▽”, and make sure that the points show up on the resulting graph!

First we need to know the actual points to put on the graph.  We know from part 2 that the two real solutions are x=-2 and x=1.

H[-2]

G[-2]

H[1]

G[1]

IntPoints = {{-2,H[-2]},{1,H[1]}}

IntPlot = ListPlot[IntPoints, PlotStyle->Blue, PlotMarkers->{"★",16}];

Show[Fplot1, IntPlot]

Problem 5

Consider the following two lists:

xvals = {2,3,-1,5,6,12,-6,-2,0,1,6,9,10};
yvals = {0,5,2,8,-6,13,-8,0,-2,4,3,7,12};

Part 1

Use the Table command to create a new list xyvals, which is a set of ordered pairs of the form {x,y} where x is from xvals and y is from yvals, in sequence.

xyvals =Table[{xvals[[i]],yvals[[i]]},{i,1,Length[xvals]}]

We can also use the Thread command, might be easier....

xyvals = Thread[{xvals,yvals}]

Part 2

Look up the TableForm command, and use it to create the following display from the xyvals variable you created in Part 1.  (No cutting and pasting this table into a new cell!)
({{"x", "y"}, {2, 0}, {3, 5}, {-1, 2}, {5, 8}, {6, -6}, {12, 13}, {-6, -8}, {-2, 0}, {0, -2}, {1, 4}, {6, 3}, {9, 7}, {10, 12}})

TableForm[xyvals,TableHeadings->{None,{"x","y"}},TableAlignments->Right]

Part 3

Use the ListPlot command to plot the data points you created in Part 1.  Make sure to pick a nifty plot marker (with a colour of your choice) along with the PlotLegend option to label the data “XY”.

XYPlot = ListPlot[xyvals, PlotStyle->Blue, PlotMarkers->{"●",16}, PlotLegends->{"XY",LegendMarkers->Automatic}]

Part 4

Create a new graph of the function y = -0.2499999999999996`+0.9166666666666666` x  and use PlotLegends to label the line as “Line”.

LinePlot = Plot[-0.25+0.916667 x ,{x,-6,12}, PlotStyle->{Red, Thickness[0.004]},PlotLegends->{"Line",LegendMarkers->Automatic}]

Part 5

Show the two plots from Parts 3 and 4 on the same graph, make sure all the points and the line are visible on the graph.

Show[LinePlot, XYPlot, PlotRange->All]

Problem 6

Here we will have a function of three variables: K(a,b,c) = (a^2)b+a b c^2 + 2c^3-2b c.

Clear[K]

Part 1

Define the function correctly using function notation.

K[a_, b_, c_] = (a^2)b+a*b*c^2 + 2c^3-2b*c

Part 2

Evaluate K(1,b,1) and K(2,2,c)

K[1,b, 1]

K[2,2,c]

Solve[K[1,1,c]==K[1,3,c],c]

Part 3

Solve the equation K(1,1,c) = K(1,3,c)

Solve[K[1,1,c]==K[1,3,c],c]

K[1,1,1]

So the solution to the equation is when c = 1, with K(1,1,1) = 2.

Part 4

Plot K(1,1,c) and K(1,3,c), be sure to choose a domain and range which clearly illustrates the intersection between the two functions.

Since the roots are at c=1, we pick a domain which contains this point.

Plot[{K[1,1,c],K[1,3,c]},{c,-2,2.5}]