Math 1483 - Quiz 1

-=Solutions=-

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

Problem 1

In at least two different ways, use Mathematica  commands to determine which is larger: (101.11^(-99.9999)) or (99.01^(-101.01)).

We can simply take the difference of the two.  Since the answer is positive, (101.11^(-99.9999)) is greater than (99.01^(-101.01)).

101.11^(-99.9999)-99.01^(-101.01)

We can simply ask Mathematica if (101.11^99.9999)>(99.01^101.01), and the result is True.

101.11^(-99.9999)>99.01^(-101.01)

We can also use the Greater command!

Greater[101.11^(-99.9999),999.01^(-101.01)]

We can also use the Less command, just to show that we can get a “False”.

Less[101.11^(-99.9999),999.01^(-101.01)]

Problem 2

Evaluate (((((2+(7^3))/(56-4*(7-3)))))^(17+(4/3)))-((((12-3))^5)/(Sqrt[(13/521)])) in the following two ways:

Part 1

Simplify the expression given in the problem, keeping your answer exact.

Simplify[ (((((2+(7^3))/(56-4*(7-3)))))^(17+(4/3)))-((((12-3))^5)/(Sqrt[(13/521)]))]

Part 2

Numerically approximate the expression to 10 decimal places.

The numerical approximation to 10 decimal places is:

N[%,10]

Problem 3

Let f(x) = 4(x^6)-3(x^5)+2(x^4)-7(x^3)+14(x^2)+18x+12, and g(x) = 10(x^6)-4(x^5)+2(x^4)-2(x^3)-72(x^2)+54x+52.

Part 1

Find ALL the values of x for which f(x) = g(x). Note there will be 6 solutions.

f[x_] = 4x^6-3x^5+2x^4-7x^3+14x^2+18x+12

g[x_] = 10x^6-4x^5+2x^4-2x^3-72x^2+54x+52

Solve[f[x]==g[x],x]

The six solutions are x=-2, -(1/2), 1, (5/3), 2i , 2i

Part 2

Use the Solve command to find only the four real solutions to the equation f(x) = g(x).

Solve[f[x]==g[x],x,Reals]

We use the extra option “Reals” to accomplish this. The four real solutions are x=-2, -(1/2), 1, (5/3).

Part 3

Determine the values of x for which f(x) > g(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[f[x]>g[x],x]

So -2<x < -(1/2) or 1 < x < (5/3).  In interval notation, this is (-2, -(1/2)) or (1, (5/3)).

Part 4

Plot the functions f(x) and g(x) on the same graph, where the graph of  f(x) is magenta in color, and g(x) is cyan in color.  Be sure to plot on a domain which contains all the points of intersection between the two functions.

The real roots all lie between x=-3 and x=3, and we evaluate the function at the the four real roots to determine possible range values.

f[-2]

N[f[5/3]]

f[1]

N[f[-1/2]]

Fplot1 = Plot[{f[x],g[x]},{x,-3,3}, PlotStyle->{Magenta, Cyan}, PlotRange->{{-3,3},{-100,550}}]

Part 5

Add a plot of the two intersection points of  f(x) and g(x) to the graph from Part 4 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 four real solutions are x=-2, -(1/2), 1, (5/3).

f[-2]

g[-2]

N[f[-1/2]]

N[g[-1/2]]

IntPoints = {{-2,f[-2]},{-1/2,f[-1/2]},{1,f[1]},{5/3,f[5/3]}}

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

Show[Fplot1, IntPlot]

Part 6

Create a graph which shades the region between  f(x) and g(x) for the two roots closest to the origin. Make the color of the shaded region light red.

Rplot1 = RegionPlot[g[x]>y && y> f[x] && x ≥ -0.5 && x≤ 1.0,{x,-1.5,1.5},{y,-2,75},PlotPoints->100,Axes->True,PlotRange->{{-3,3},{0,100}},PlotStyle->LightRed,BoundaryStyle->None]

Part 7

Add the plot from Part 6 to the plot from Part 5. I.e. your new plot should show two functions, 4 points of intersection,  and a shaded region.

Show[Fplot1, Rplot1,IntPlot]

Problem 4

Consider the following list: (Be sure to press shift+enter on the next line to store the list in the variable FunList).

FunList = {{},{1,2},{3,4,5},{{6},{7}},{{8,9},{10}},11,12,13}

Part 1

How many elements are there in FunList?

Length[FunList]

Applying the length command, we see that there are 8 elements in FunList.

Part 2

If we needed to get at the value of {10} in FunList, what indexing command do we need to use?

We will do this step by step!  Note that the 5th entry in the list contains element {10} as part of its list.

FunList[[5]]

The above list, {10} belongs to entry 2

FunList[[5]][[2]]

Part 3

If we needed to get at the entry 10 in FunList, what indexing command do we need to use?

The hard work was done in part 2, so now we just slap a [[1]] on the last command from part 2.

FunList[[5]][[2]][[1]]

Part 4

Is {8, 9} an element of FunList?  Use a Mathematica command to determine this!

MemberQ[FunList,{8,9}]

The answer is no.