Question: Mathlab: JUST THE PLOT OF THE FUNCTION WITH THE MINIMUM VALUE (y- value): ??? 4 Plotting functions with vertical asymptotes Plotting functions with vertical asymptotes
Mathlab:
JUST THE PLOT OF THE FUNCTION WITH THE MINIMUM VALUE (y- value): ???
4 Plotting functions with vertical asymptotes
Plotting functions with vertical asymptotes can cause troubles. For instance, suppose we want to plot the function f(x) = 1/sin(x) over the interval [0,p]. A first attempt may look like this:
>> x = linspace(0,pi); >> plot(x, 1./sin(x))
If you make this graph, you'll find that it doesn't look like what you would expect. In this case the function has a vertical asymptote at both endpoints 0 and p. This means that when the xvalues are close to the endpoints, the corresponding y values get to be very large. This is why the y-axis is labeled using scientific notation indicating 15 zeroes after the numbers. This makes this graph worthless for answering questions about f(x). The remedy is to replot, only this time avoiding the asymptotes:
>> delta = 0.1 >> x = linspace(delta, pi-delta) >> plot(x, 1./sin(x))
This is much better, allowing us to see the shape of the graph. We used a variable delta so that if we wanted to, it is easy to make changes.Exercise 4: From its graph, estimate the minimum value of the function
|
over the interval (0,p/2). Just plotting with x values given by
>> x = linspace(0,pi/2)
will cause the same problems as above. Make a plot, judiciously avoiding the vertical asymptotes, and then find the minimum value (y value) of the function on this interval.
| Enter a number | |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
