Skip to main content

Exploring Calculus with Maple Introductory Calculus

Section 3.7 Shark Attack

Subsection 3.7.1 Recommended Tutorials

Before starting on these exercises, you should familiarize yourself with the material covered in the following tutorials:

Subsection 3.7.2 Introduction

In this activity, you will determine whether you can swim to safety before a shark attacks. You will need to use piecewise functions and the Net Change Theorem to find the outcome.
Suppose that you are surfing on the ocean and there is a shark 50 metres behind you, at rest (i.e. \(v(0)=0\)).
The shark senses you and begins accelerating toward you at a rate of 5 m/s\(^2\text{,}\) up to a top speed of 13 m/s. You see the shark coming and begin swimming towards shore at a speed of 2 m/s. Assume there is no time needed for you to accelerate up to your top speed. If the shore is 20 m away from you (and 70 m away from the shark), do you make it to shore before the shark attacks?
Figure 3.1. An illustration of the shark trying to catch you as you swim to shore.
For convenience, we will let the shark’s initial position be \(0\) m and your initial position be \(50\) m. This means that the shore is at a position of \(70\) m.

Exercises 3.7.3 Exercises

1.

In this exercise, you will create a function that gives the position of the shark at time \(t\text{,}\) relative to its initial position.
(a)
Calculate by hand or using Maple how long it takes for the shark to reach its top speed of 13 m/s if it accelerates at 5 m/s\(^2\text{.}\) Assign this time to t1. Note that the shark will no longer accelerate after \(t_1\) seconds, since it has reached its top speed.
Aside
(b)
Define a piecewise function for the shark’s velocity using the piecewise() command and assign this to sharkvelocity(t). This velocity function should be linearly increasing for \(0 \leq t \leq t_1\) while the shark accelerates and then constant for \(t > t_1\text{.}\)
Hint 1.
You can read how to define piecewise functions in SectionΒ 9.5.
Hint 2.
The shark’s velocity function should look similar to the graph below.
(c)
Integrate \(sharkvelocity(t)\) with respect to \(t\) to find the position function for the shark. Assign this piecewise position function to something like sharkposition(t).

2.

Since your swim velocity is constant, determining your position function is much simpler. Assign the function \(swimvelocity(t) = 2\) and integrate \(swimvelocity(t)\) with respect to \(t\) to find your displacement function (the net change from your initial position). Add 50 to this displacement function for your initial position and assign it to swimposition(t).

3.

It’s time to see if you can swim to the shore before the shark catches up to you!
(a)
Plot the position functions for you and the shark on the same graph. Adjust your plot axes so that you can see the moment that the shark catches up to you.
Hint.
You may wish to specify colours for each function so that you can tell which function is which.
(b)
Determine the time that the shark catches up to you. Solve for when the position function of the shark is equal to your position function.
Hint.
In this question, you are solving for time, \(t\text{.}\) You can try using the solve() command first, and then change it to fsolve() if necessary.
(c)
Evaluate the shark’s position function at this time to determine the position of the shark when it will catch you. Will you make it to the shore safely?

4.

Instead of swimming, let’s suppose you hop on your board and surf the nearest wave away towards the shore. You are initially at rest, but due to the wave, you accelerate at \(2\) m/s\(^2\) until you reach a top speed of \(4\) m/s.
(a)
Define a new piecewise function for the velocity of surfing the wave and assign it to \(surfvelocity(t)\text{.}\)
Hint.
The piecewise function for your surfing velocity will be similar to the one you set up for the shark in TaskΒ 3.7.3.1.b.
(b)
Repeating the steps from a previous exercise, determine the position of the shark when it will catch you. Will you make it to the shore safely?