Math 1483 - Quiz 3

<=/Solutions\=>

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

Problem 1

Recall from Quiz #2 that a common formula used for counting calories of a food consumed is given by:

TotCal(P,F,C,D) = 4P+9F+4(C-D)

Where T is the total number of calories, P is the number of grams of protein, F is the number of grams of fat, C the total number of grams carbohydrate, and D the number of grams of dietary fiber.

Describe the formula TotCal(P,F,C,D) = 4P+9F+4(C-D) using words.

Answers will vary here, one would describe the formula as: The total number of calories, T, is the sum of 4 times the number of grams of protein  P, 9 times the number of grams of fat F, and four times the difference in the number of grams of carbohydrate C and the number of grams of dietary fiber D.

Problem 2

An attractive force, F, exists between all objects with mass. The magnitude of F (in N) is directly proportional to the masses of the two objects and inversely proportional to the square of the distance between the two objects.  The formula for F is given by:

F = G (((Subscript[m, 1])(Subscript[m, 2]))/(r^2))

Here G is the universal gravitational constant (meaning it has the same value throughout the universe), (Subscript[m, 1]) and (Subscript[m, 2]) are the masses of the objects (in kg), and r is the distance between them (in m).  The value of G is 6.67 (10^(-11)) N (m^2)/(kg^2).

Frce[G_,m1_,m2_,r_]:=G*m1*m2/r^2;

Frce[6.67*10^(-11),m1,m2,r]

The following is a table of the masses of each of the planets (the mass of the sun is 1.989 (10^30) kg), as well as the distance from each planet to the sun.  Refer to this table, and this table ONLY, when answering the questions below for this problem.

({{Planet, Mass ((10^24) kg), Distance from Sun ((10^9)m)}, {Mercury, 0.330, 57.9}, {Venus, 4.87, 108.2}, {Earth, 5.97, 149.6}, {Mars, 0.642, 227.9}, {Jupiter, 1898, 778.6}, {Saturn, 568, 1433.5}, {Uranus, 86.8, 2872.5}, {Neptune, 102, 4495.1}})

Part 1

Compute the force between each of the planets and the sun by using the Frce function defined above.

Note, all answers have units in Newtons (N)
Mercury:

Frce[6.67*10^(-11),1.989*(10^30),0.330*(10^24),57.9*(10^9)]

Venus:

Frce[6.67*10^(-11),1.989*(10^30),4.87*(10^24),108.2*(10^9)]

Earth:

Frce[6.67*10^(-11),1.989*(10^30),5.97*(10^24),149.6*(10^9)]

Mars:

Frce[6.67*10^(-11),1.989*(10^30),0.642*(10^24),227.9*(10^9)]

Jupiter:

Frce[6.67*10^(-11),1.989*(10^30),1898*(10^24),778.6*(10^9)]

Saturn:

Frce[6.67*10^(-11),1.989*(10^30),568*(10^24),1433.5*(10^9)]

Uranus:

Frce[6.67*10^(-11),1.989*(10^30),86.8*(10^24),2872.5*(10^9)]

Neptune:

Frce[6.67*10^(-11),1.989*(10^30),102*(10^24),4495.1*(10^9)]

Part 2

Compute the attractive force between Jupiter and Mars.

In order to do this, we need to compute the distance between Jupiter and Mars. This should be the difference between the distances between (1) Jupiter and the Sun and (2) Mars and the Sun.  This gives a value of 2.67995×(10^17).

rJE = 778.6-227.9

Frce[6.67*10^(-11),1898*(10^24),0.642*(10^24),550.7*(10^9)]

Part 3

Find the distance (in m) that the Earth would have to be from Jupiter so that the attractive force between the Earth and Jupiter would be the same as the attractive force between the Earth and the Sun.

We know the attractive force between the Earth and the Sun from part 1, it is 3.5389282784394747`*^22 Newtons.  We also know the masses of both the Earth and Jupiter.  So we can set up the equation where the only unknown is the distance between the two planets, and use the NSolve command.

NSolve[3.53893 (10^22) == Frce[6.67*10^(-11),1898*(10^24),5.97*(10^24),r],r]

We see that we have two answers, but clearly we want the positive result, which is 4.62 (10^9) meters, or 4.62 x (10^6) kilometers, which is still an order of magnitude closer than Mercury is to the Sun.

Part 4

How much would Mars have to weigh (in kg) to experience the same attractive force with the Sun as the Earth does with the Sun.

Similar to part 3, we have all the information we need, and we must set up an equation and solve for Mars’s new mass.  We essentially use the Frce function from the attractive force calculation for Mars and the Sun, but solve for the new unknown mass m using the attractive force between the Sun and the Earth.

NSolve[3.53893 (10^22) ==  Frce[6.67*10^(-11),1.989*(10^30),m,227.9*(10^9)],m]

Mars would have to weigh 1.385 (10^(25 ))kg, which 21.5 times the original mass of Mars.

(1.385 (10^(25 )))/(0.642*(10^24))

Problem 3

In this problem, we will estimate the cost of a semester of living on campus at Southeastern.  The cost per credit hour for an undergraduate face-to-face class is $208.00 and for an online course is $258.00.  Every credit hour also incurs a $107.00 in `mandatory’ fees of one kind or another.  You have also decided to live by yourself in the North Halls, with your own private bathroom, which costs $2155.00 per semester.  For a meal plan, you chose Flex Choice 7 which runs you another $1,650.00 per semester.

Part 1

Write an expression which relates the total cost T  of your semester to the number of face-to-face credit hours (f) you wish to take and number of online credit hours (n). Be sure to include fixed costs!

There are many ways to write this, but the algebra will always work out to the same expression:

T(f,n) = $208.00*f+$258.00*n + $107.00*(f+n)+$2155.00+$1650.00

T[f_,n_]:=208.00*f+258*n+107.00*(f+n)+2155+1650

T[f,n]

Expand[T[f,n]]

Part 2

You have to take 2 face-to-face classes which are 3 credits, each,one face-to-face class which is 4 credits, and two online courses each of which are 2 credits.  Express this in function notation.

In function notation, we need 2*3+1*4 face-to-face credits and 2*2 online credits, so this should be T(10,4)

Part 3

Evaluate your answer to Part 2.

We evaluate T(10,4)  below. This corresponds to a cost of $8415 for the semester.

T[2*3+1*4,2*2]

T[10,4]

Part 4

How much money would you save if you switched your online class to a face-to-face class?

One can simply compute T(14,0)-T(10,4), or we can simply note that the difference in price (per credit hour) is $50.00, so one would save $200.00.

T[14,0]-T[10,4]

Problem 4

A population of 100 rabbits is released into the wild, where they must now compete for food resources with other animals, and might also get eaten themselves by animals further up the food chain.  The population of the rabbits t years after being released is given by the function:

P(t) = ((100 1200 (e^(0.4t)))/((1200-100)+100*(e^(0.4*t))))
We also define the function so you can use it for the questions which follow.

Rabbits[t_]:=((100*1200*(E^(0.4*t)))/((1200-100)+100*(E^(0.4*t))))

Part 1

Evaluation P(0) (i.e. Rabbits[0]), explain why your answer makes sense.

Rabbits[0]

There are 100 rabbits at t=0 years, which was the initial population.

Part 2

Create a table of values for the rabbit population for each of the first 20 years.

TableForm[Table[{i,Rabbits[i]},{i,0,20}] ,TableHeadings->{None,{"t years","Rabbit population"}}]

Part 3

To what value does the population of rabbits appear to be tending to by looking at your table from part 2?

The population appears to be tending to 1200 rabbits.

Part 4

At what time (in years) was the population 700 rabbits?

We use the NSolve command and set the function equal to 700, and solve for time t. This gives approximately 6.8 years as the time at which there are 700 rabbits.

NSolve[Rabbits[t]==700,t,Reals]

Part 5

Graph both the function and the limiting value together, be sure to use a correct domain and range to view both the limiting behaviour and the overall shape of the population function, making sure that the graph agrees with your answer from Part 3.

Plot[{Rabbits[t],1200},{t,0,30},PlotRange->{{0,30},{0,1200}}, PlotLegends->{"Rabbit Population", "Limit"}, AxesLabel->{"t years", "population"}]

Problem 5

Weather data can be downloaded and used in Mathematica.  The WeatherData command allows you to select all sorts of data from weather stations across the world.  The following shows all the options for data one can get from the WeatherData command.

WeatherData["Properties"]

Your task -- Do a search in Mathematica’s help on the WeatherData command, and use some of the examples you see in the help page to graph the both the max and mean wind speeds for Durant for the range of dates: August 1st, 2022 to September 15th, 2022.  Plot both of these data on the same graph, and be sure to use the PlotLegends option  as well. 

Note #1: You will need to find the name of Durant’s weather station.
Note #2: You will need to have access to the internet while you do this problem.

DateListPlot[{WeatherData["KDUA","MaxWindSpeed",{{2022,4,1},{2022,7,1},"Day"}],WeatherData["KDUA","MeanWindSpeed",{{2022,4,1},{2022,7,27},"Day"}]},Joined->True, PlotLegends->{"Max Wind Speed","Mean Wind Speed"}]