# Chapter 5

### Exercises

1. Make two separate plots of the function one for x and one for x 2. Plot the function Notice that the function has a vertical asymptote at x=2. Plot the function by creating two vectors for the domain of x, the first vector with elements from -4 to 1.7, and the second vector with elements from 2.3 to 8. For each x vector, create a y vector with the corresponding values of y according to the function. To plot the function make two curves in the same plot.
3. You have an electrical circuit that includes a voltage source vs with an internal resistance rs and a load resistance . The power P dissipated in the load is given by: Plot the power P as a function of for   given that and 4. The Gateway Arch in St. Louis is shaped according to the equation: Make a plot of the arch. Draw a horizontal line at ground level (y=0), 5. In astronomy, the relationship between the relative temperature (temperature relative to the sun), relative luminosity and relative radius of a star is modeled by: The HR (Hertzsprung-Russell) diagram is a plot of versus the temperature. The following data are given:

 Temp (K) L/L R/R Sun Spica Regulus Alioth Barndard’sStar Epsilon Indi Beta Crucis 5840 22400 13260 9400 3130 4280 28200 1 13400 150 108 0 0.15 43000 1 7.8 3.5 3.7 0.18 0.76 8

To compare the data with the model, plot a HR diagram. The diagram should have two sets of points. One uses the values of L/L from the table (use asterisk markers), and the other uses values of L/L that are calculated by the equation using R/R from the table (use circle markers). In the HR diagram both axes are logarithmic. In addition, the values of the temperature on the horizontal axis are decreasing from left to right. Label the axes and use a legend. (See https://en.wikipedia.org/wiki/Hertzsprung%E2%80%93Russell_diagram for a general explanation of the HR diagram.)

6. The position x as a function of time that a particle moves along a straight line is given by: The velocity v(t) is determined by the derivative of x(t) with respect to t, and the acceleration a(t) is determined by the derivative of v(t) with respect to t.
Derive the expressions for the velocity and acceleration of the particle, and make plots for the position, velocity, and acceleration as a function of time for t Time t is measured in seconds, and position x is measured in meters. Make three plots, one for position, one for velocity, and one for acceleration. Label the axes appropriately with correct units.
7. A resistor, R=2 and an inductor, L=1.7H are connected to a voltage source in series (RL circuit). When the voltage source applies a rectangular voltage pulse with an amplitude of V=24V and a duration of 0.5s, the current i(t) in the circuit as a function of time is given by: for t  for t
Make a plot of the current as a function of time for t seconds.