Make Tournament Winning DFS Lineups by Applying Optimization Problems (MLB) – Calculus in the Real World

As a math tutor, people have always asked me: how is calculus used in real life? There are many examples of calculus in the real world, and statistics in the real world too. These applications can be found in all kinds of industries, and overlapping with other sciences. However, there is one field that has always interested me most: sports.

I have always been fascinated by people using statistics and math to predict the outcome of sporting events. Or even to evaluate the performance of players, their impact on the outcome of the game, and their value to their team. However, I do not work in the sports world. I do not need to inform decisions about what players Billy Bean wanted to sign, or how big of a contract the Atlanta Braves should offer their 1st baseman with a career .859 OPS and a .234 strike out rate.

But what I can do is play fantasy sports. I can investigate how to construct the best possible lineup in a Daily Fantasy Sports (DFS) slate on FanDuel, and actually use the knowledge I gain from that investigation. So that’s what I have decided to do.

We will build the best FanDuel MLB lineup optimizer. Since we will be building it from scratch, we should have the best free DFS lineup optimizer on the internet by the time we’re done with this. I invite you to join me on this journey, and we’ll see what we can learn together. Let’s get started!

Keep in mind, I will be showing you investigative techniques that you could apply to DraftKings as well. Due to slight scoring or lineup differences between FanDuel and DraftKings, you may need to adjust our model a bit. However, the overall ideas should be the same.

Disclaimer: Nothing in this article, or any other content on this site or my YouTube channel should be interpreted as financial or gambling advise. This content is all created for educational and entertainment purposes. We will be investigating how to evaluate DFS MLB lineups mathematically in order to maximize the chances of winning a large tournament on FanDuel. If you decide to use these methods to create your own lineups and enter them in paid contests, please be smart, be safe, and only play with money you can afford to lose. There are no guarantees here.

Want to Play Along?

If you want to play along and enter some FanDuel lineups of your own as we conduct this investigation, you can use my FanDuel referral link here to get a deposit bonus. You should just need to deposit at least $15 within 30 days of signing up, and you’ll get a $15 bonus added to your account if you use that link. Can’t complain about some free money, right?

Background Research

Let’s start with the basic strategy we will investigate, and hopefully build on. Perhaps the most popular strategy in large tournaments on DFS is lineup stacking. This is a popular strategy in MLB DFS, but also in other sports. The idea is that we select multiple players from the same team to put in our lineup. If, for example, the New York Yankees blow out the Chicago Cubs by a final score of 8-1, there were likely a few Yankees with exceptional fantasy performances that day. Even better than that, many point producing events throughout the game would have most likely been double counted in your lineup, if you had multiple Yankees.

Sticking with the prior example, let’s say you have Aaron Judge and Giancarlo Stanton batting 3rd and 4th respectively, for the Yankees. You put both of them in your lineup. In the 3rd inning, Aaron Judge hits a double, getting you some points. Then Giancarlo Stanton comes up and hits a 2-run homer. You would get the points for 1 run for Judge scoring, and the HR, 1 run, and 2 RBI for Stanton’s swing of the bat. As you could imagine, this effect is compounded even more if you have 3 or 4 players lined up from the same team. If they start stringing hits together, that’s a lot of double counted points.

What players should you stack? What teams should you pick to stack from?

I found an article that addresses a few of these questions. I’ll summarize the main points I decided to start testing out, but if you want to see the full explanation of these strategies, you can see that article here.

There are 3 main ideas shown in that article that I decided to start building lineups around:

  1. We should target batters matching up against the pitchers with the lowest salaries on FanDuel. Lower salary implies it’s a worse pitcher, and will likely give up more fantasy points to opposing batters.
  2. We should target players batting as close to the top of the lineup as possible. Also when we stack players from the same team, they should be as close to each other in the lineup as possible.
  3. It is common for multiple players on the same team to be in the top 20 of all players in any given slate, and not uncommon at all for multiple teammates to be top 10, or top 5.

You can check out the article linked above for more details, but point #3 essentially just validates that stacking 2-4 players from the same team is a valid strategy. This is especially true when you enter a large tournament where you need your lineup to be in about the top 25th percentile just to finish in the money.

Points #1 and #2 though, tell us a bit about which teams to stack players from, and which players in the lineup we want.

Turning Our Strategy into an Optimization Problem

This is where the calculus comes into play. We won’t be solving any optimization problems here, or doing calculus. However, I do think it helps in the setup if you have at least a basic understanding of how to set up and solve a calculus based optimization problem. If you want a lesson on those, you can find that here.

Otherwise, let’s get into what I started with. When we sit down to set our lineup, we have something like this.

We need to fill our lineup (on the right) with the 9 players we think will score as many points as possible, from the available players shown (on the left). Each of them has a salary associated with them, and the sum of the 9 players’ salaries we choose needs to be below $35,000.

Don’t worry, you don’t have to actually spend 35,000 real dollars to fill your lineup. Think of that as game money. It’s just a way for the players we choose to have some limitation on it. It prevents us from just choosing the best player in each position across the board.

All an optimization problem is, is one equation that we are trying to maximize (or minimize), and one or more restriction equations that limit our variables somehow.

Well, it just so happens that’s all a FanDuel lineup is. Think about it. We have one thing that we are trying to make as big as possible: fantasy points scored.

And we have several restrictions addressing what our lineup is allowed to be:

  • We need 9 exactly players in total.
  • Total team salary less than or equal to $35,000.
  • Exactly 1 Pitcher (P).
  • At least 1 Catcher or 1st Baseman (C/1B).
  • At least 1 2nd Baseman (2B).
  • At least 1 3rd Baseman (3B).
  • At least 1 Short Stop (SS).
  • At least 3 Outfielders (OF).

This means, we need a lineup consisting of: P, C/1B, 2B, 3B, SS, OF, OF, OF, and UTIL. “UTIL” stands for utility and this position can be a C, 1B, 2B, 3B, SS, or OF. Basically, anything except a second Pitcher.

If we create a several variable optimization problem from this, using the one equation to optimize (sum of projected fantasy points), and the several restriction equations, we would at least be able to create legal lineups that we expect to do as well as possible.

However, we want to do better than that. Keep in mind there is always going to be variations in how many points players actually get. And sometimes, it’s not very close to their projected points. So, we want to use some of the stacking strategies I mentioned earlier to take advantage of those variations and give us a decent chance at having our lineup in the top 25th percentile. And it’s even better if we can be in the top 10%, 5%, 1%, or even the top lineup in our contest.

If we don’t take advantage of the stacking strategies, it’s less likely for many players in our lineup to do really well, or really poorly, on the same day. We want to create a boom or bust situation. This is because one big “boom” lineup can cover the cost of several “bust” lineups. Plus, a “middle of the road” lineup is just as useful as a bust.

It’s not…

They’re both worth $0.00.

Here Is Why

I’m sure by now, you are wondering why I have assumed that a “boom or bust” strategy is our best option. Let me elaborate.

Below is an image showing the results of a large tournament style contest. The gray and green bar represents all 3,217 lineups that were entered into the tournament. The green section shows the lineups that finished “in the money” and the gray is all the people that lost their $2.22 buy in. The blue figure shows where this lineup finished in there, 1,776th place of the 3,217 entries.

This lineup actually finished in the top half of this tournament, slightly better than “middle of the road.” But not high enough. The $2.22 entry fee was lost because we needed a bit more “boom” in the lineup. Might as well have been a “bust.” This is what we need to shoot for when only the top 23.3% of lineups win anything. I know it’s not shown in the image, but the top 750 lineups got money back in this tournament, and the 750th place finish got $5 from their $2.22 entry fee.

The top 10 lineups collectively won $1,295 of the total $6,000 in prizes for the whole contest. And the top 1 lineup won $500.

Hopefully this convinces you of the “boom or bust” strategy we will be adopting. One 1st place finish would pay for 225 losses of the $2.22 entry (in this specific contest structure). If we can really create a strategy with serious “boom or bust” potential, we would break even if we got 1st place 1 time, and finished “out of the money” 225 times.

This boom or bust approach likely would not be the best option for other contest types on FanDuel, like 50/50 or head to head contests. But for tournament style, the payout structure is always top heavy like the example above. Since we are starting with an investigation of winning tournament style contests, the boom or bust approach is a good starting place.

How do you optimize your lineup for stacking strategies?

Well, it’s quite simple to do when you’re treating your lineup like one big optimization problem. I should let you know, we don’t need to be able to solve this optimization problem. We have a computer for that. I’ll explain how we can have a computer solve this problem for us shortly, but for now we need to think about how to add in these extra considerations.

All we need to do, is add additional restriction equations to our optimization problem. Don’t worry about how these look mathematically for now. Let’s just think about the logic of what we want in our lineup.

Based on the 3 main takeaways I listed above, let’s start by applying the following restrictions to our lineup and see what happens. We can worry about fine tuning this later.

  • Stack players opposing the lowest salary pitchers. On FanDuel, you can only use up to 4 players on the same team in one lineup, so let’s start there. This may be 3 batters and the pitcher, or 4 batters on this targeted team. I figure the opposing pitcher is more likely to have run support and get the win, so he should still benefit from going up against a bad starting pitcher.
  • We will only use players in the starting lineup batting 1-5. This will guarantee that our stacked players are near each other in the lineup, and will help ensure that all of our batters are going to be getting a decent number of plate appearances (PA).
  • It will also be a good idea to add in one more thing. Let’s make sure we aren’t selecting any batters on the team opposing our pitcher. It is extremely difficult for our pitcher to have a good game and a batter on the opposing team to have a good game at the same time. One of them scoring points basically takes points away from the other, so not putting this in will lead to a “middle of the road” lineup. Again, useless in a big tournament.

Tools Used to Set up the Optimization Problem

In order to get this problem set up, I used a couple different tools. First, I used RotoWire projections for projected points for each player. This was the value that I wanted to maximize in this problem.

I used PuLP, which is a free Python package that is essentially made to create and solve optimization problems like this. You can check out the documentation on PuLP here. It can be used to solve the kinds of optimization problems you would need to solve in a calculus class, but it’s very helpful when you are trying to solve more complex problems like this. It would take an unreasonable amount of time to solve a problem like this by hand.

There was some setup I had to do to get all of the data from the RotoWire projections .csv file and decide which team would be targeted to stack 4 players from, but here is the portion of the code that basically creates our optimization problem. You will likely have to do some clean up or restructuring of variables here if you want to use this code yourself, but I wanted to give you a glimpse of how we can actually set up an optimization problem for a computer to solve for us.

import pulp

x = pulp.LpVariable.dict("player", range(0, len(all_player_list)), 0, 1, \
prob = pulp.LpProblem("Lineup", pulp.LpMaximize)
prob += pulp.lpSum(float(all_player_list[i][8]) * x[i] for i in range(0, \
prob += sum(x[i] for i in range(0, len(all_player_list))) ==  9 # 9 total players
prob += sum(x[i] for i in range(0, len(all_player_list)) if 'P' in \
            all_player_list[i][3]) == 1 # 1 P
prob += sum(x[i] for i in range(0, len(all_player_list)) if 'C' in \
            all_player_list[i][3] or '1B' in all_player_list[i][3]) >= 1 # 1 C/1B
prob += sum(x[i] for i in range(0, len(all_player_list)) if '2B' in \
            all_player_list[i][3]) >= 1 # 1 2B
prob += sum(x[i] for i in range(0, len(all_player_list)) if '3B' in \
            all_player_list[i][3]) >= 1 # 1 3B
prob += sum(x[i] for i in range(0, len(all_player_list)) if 'SS' in \
            all_player_list[i][3]) >= 1 # 1 SS
prob += sum(x[i] for i in range(0, len(all_player_list)) if 'OF' in \
            all_player_list[i][3]) >= 3 # 3 OF
prob += sum(x[i] * int(all_player_list[i][7]) for i in range(0, \
            len(all_player_list))) <= 35000 # total salary

# Used to make sure there is at least x players stacked from same team
support_min_hires = pulp.LpVariable.dicts('team hires', teams, cat='Binary') 

# Makes sure that the targeted team has at least the desired stack.
for team in teams: 
    prob += pulp.lpSum(x[i] for i in range(0, len(all_player_list)) if \
                       all_player_list[i][4] == stacked_team) >= \
                       support_min_hires[team] * 4
prob += pulp.lpSum(support_min_hires[team]) >= 1

# Prevent lineups from having pitchers and batters going against each other.
for p in range(0, len(all_player_list)): 
    if 'P' in all_player_list[p][3]:
        prob += pulp.lpSum([x[i] for i in range(0, len(all_player_list)) if \
        all_player_list[i][4] == ''.join(filter(str.isalnum, \
        all_player_list[p][5]))] + [8 * x[p]]) <= 8

# Makes sure we don't select two of the same player in two different positions.
# This was needed because I created multiple player objects for the same
# player if they could be used in 2 positions.
for player in players: 
    prob += pulp.lpSum(x[i] for i in range(0, len(all_player_list)) if \
                       all_player_list[i][0] == player) <= 1

What does this do?

To start, I ran this problem solver a few times. I started with creating a restriction equation that would force our lineup to stack 4 players from the team opposing the cheapest pitcher on the slate. This created the top lineup – “LINEUP #1.”

Then I repeated the process, this time forcing a 4 player stack opposing the second cheapest pitcher of the slate. Then the third cheapest, fourth cheapest, etc. Until I was left with 10 lineups for the given slate of players. For example, running this on the main slate for Friday, September 2, 2022 left us with this:

Stack number: 4 – Stacked Team: SEA
[‘Cody Morris’, ‘R’, ‘P’, ‘P’, ‘CLE’, ‘SEA’, ‘Yes’, ‘5500’]
=== LINEUP #1 ===
Solution status: Optimal
Charlie Morton with projected 35.56 points. He is P, cost 9800
Carson Kelly with projected 12.13 points. He is C, cost 2300
Jose Altuve with projected 14.26 points. He is 2B, cost 4000
Eugenio Suarez with projected 11.20 points. He is 3B, cost 3700
Carlos Correa with projected 13.94 points. He is SS, cost 3300
Max Kepler with projected 13.70 points. He is OF, cost 2600
Julio Rodriguez with projected 12.73 points. He is OF, cost 3600
Mitch Haniger with projected 11.71 points. He is OF, cost 3300
Jesse Winker with projected 11.58 points. He is OF, cost 2300
Total cost: 34900, Total Projected Points: 136.81

Stack number: 4 – Stacked Team: BOS
[‘Dallas Keuchel’, ‘L’, ‘P’, ‘P’, ‘TEX’, ‘@BOS’, ‘Yes’, ‘5500’]
=== LINEUP #2 ===
Solution status: Optimal
Charlie Morton with projected 35.56 points. He is P, cost 9800
Carson Kelly with projected 12.13 points. He is C, cost 2300
Javier Baez with projected 12.51 points. He is 2B, cost 2800
Alex Bregman with projected 13.25 points. He is 3B, cost 3600
Xander Bogaerts with projected 13.15 points. He is SS, cost 3800
Max Kepler with projected 13.70 points. He is OF, cost 2600
Tommy Pham with projected 13.57 points. He is OF, cost 3500
J.D. Martinez with projected 13.08 points. He is OF, cost 3200
Alex Verdugo with projected 11.10 points. He is OF, cost 3300
Total cost: 34900, Total Projected Points: 138.05

Stack number: 4 – Stacked Team: MIN
[‘Joe Kelly’, ‘R’, ‘P’, ‘P’, ‘CWS’, ‘MIN’, ‘Yes’, ‘5500’]
=== LINEUP #3 ===
Solution status: Optimal
Charlie Morton with projected 35.56 points. He is P, cost 9800
Carson Kelly with projected 12.13 points. He is C, cost 2300
Jose Altuve with projected 14.26 points. He is 2B, cost 4000
Jose Miranda with projected 10.82 points. He is 3B, cost 2900
Corey Seager with projected 14.41 points. He is SS, cost 4100
Max Kepler with projected 13.70 points. He is OF, cost 2600
Tyler O’Neill with projected 13.61 points. He is OF, cost 3300
Nick Gordon with projected 11.66 points. He is OF, cost 2500
Carlos Correa with projected 13.94 points. He is SS, cost 3300
Total cost: 34800, Total Projected Points: 140.09

You can see above each lineup, the team we are stacking 4 players from, and the opposing pitcher listed that we are trying to target. This is just the first 3 lineups created, but there were 7 more like them. You could easily loop through all the pitchers and create any number of lineups. Maybe you just want the top one, or maybe you want all available options. In theory, this should give us a list of 10 lineups with decent “boom or bust” potential.

What this creates for us is a list of optimized lineups that we can choose from on any given day, any given slate. And a system that we can use to create lineups for historical contests and slates and see how they would have done, as well as future contests to speed up our lineup creating process when we want to play.


This is a great start as this should be a list of mathematically optimized lineups. The fact that we treated it as an optimization problem, means that we selected the 9 players with the highest number of projected points as possible, while making sure it’s still a legal lineup.

In theory, we should get the maximum bang for our buck with these players in terms of the points they score based on the salary they cost. But this does rely on one very big assumption: the projected points provided by RotoWire are good projections.

Are they?

If so, then this system would certainly provide optimal lineups with great opportunity to “boom” and get us to the top of a tournament. This is thanks to the fact that we used the stacking strategies discussed earlier.

But if the projections are not very good, then we might as well have just picked random players, or assumed average points based on their position in the lineup, or some other (likely not very useful) method for projecting individual player performance.

Essentially what we have here, is a great system for creating lineups with a high potential for a maximized team score, as long as we can reasonably predict the individual players’ performance.

How well does this system work?

This method seems to give us a good shot at winning a top heavy payout structured tournament. Or at least placing “in the money.” But how well does it actually work? Would it be profitable, break even, or lose us money long term?

Those are important questions to answer, and those will be questions that we attempt to answer in the next section of our investigation. Without doing some testing and confirming the performance of this strategy in actual FanDuel tournaments, we can’t say that it’s a good strategy with any confidence.

Next we will create a system for back testing this strategy throughout the 2022 MLB season, as well as using some statistical analysis to evaluate how confidently we can expect these results to be repeated. Or extended into a larger sample of contests. This will allow us to confirm how much money we would have won or lost in paid games on FanDuel throughout the season, up to this point. And if we can confidently enter lineups from this system with a reasonable expectation of winning some of them in the future.

This does give us a great starting place for creating lineups of our own though. So, until then, I think I’ll enter some of these lineups myself and see what happens. Have a little fun with it. That is what this is all about after all. Then we take this investigation a bit further.

If you’d like to join me, you can go get signed up on FanDuel right here.

Some links in this article may be affiliate links or referral links, meaning I would get a small commission for your purchase at no additional cost to you.

How to Create an Euler’s Method Differential Equations Calculator

Euler’s method is a useful tool for estimating a solution to a differential equation initial value problem at a specific point. In this post, I’m going to show you how to apply Euler’s method both on a piece of paper doing calculations by hand, and in an Excel spreadsheet.

Before we jump into the first example I just want to mention that this uses one of the formulas on my Calculus 2 Study Guide (Integral Calculus Cheat Sheet). It’s available for instant download so you can start using it today. You can learn more about that cheat sheet and buy your copy today by clicking here.

How to Apply Euler’s Method With Differential Equations

We will go ahead and start with this first example here. Use Euler’s method with a step size of 0.2 to estimate \(y(1)\), where \(y(x)\) is the solution of the initial-value problem \(y’=xy-x^2, \ y(0)=1\). If you’d prefer to see this example in video form you can watch it here.

I like to solve these problems using a table. I think that’s the easiest way to keep everything you’re doing organized. And then we’re going to use the formula on my study guide to fill in the table row by row until we get to our answer. So let’s just go ahead and start with the formula that’s on my study guide first, and then I’ll show you what I mean by setting up the table.

This is just the information that we would need to be given. We know that we have some initial value problem, where we have \(y’ = F(x,y)\). And then we have the initial condition. So, we know that if we plug in \(x=0\), into the solution to the initial value problem, we would get out \(y=1\). Since we know that in this example, we have \(y’ = xy \ – x^2\), that tells us right there that we’re going to have

$$F(x, y) = xy \ – x^2$$

To apply this Euler’s method formula, what we need to do is set this up in a table. And you can kind of think of this table like an Euler’s method differential equation calculator. I will show you how to use a computer to make this easier. But it is important to know how it works so that you can do it manually too.

How to Set Up the Euler’s Method Table

We’re going to need a few different columns in our table to keep track of all the calculations. We’re going to start with a column where we keep track of what n we’re on. We also need columns for our \(x_{n-1}\), and our \(y_{n-1}\).

Then we also want to calculate what we get when we plug into, our \(F(x_{n-1}, y_{n-1})\) based on the \(F(x,y)\) we figured out already. Finally we are going to use all these pieces to figure out our \(y_n\) based on the formula discussed earlier from my study guide.

It really is just up to personal preference. If you don’t like keeping of all these columns, you don’t really have to. I like to break it down into the smallest possible pieces, and keep track of each individual piece so that you don’t get lost. I do this and recommend this for you because it’s really easy to get lost when you’re trying to keep track of all these different things.

I like to break it down into, at the smallest possible elements of this formula, and keep track of all those, so that when we put it all together, it’s a lot easier to figure out what’s going on. Doing this will give us the following columns to fill in.

n\(x_{n-1}\)\(y_{n-1}\)\(F(x_{n-1}, y_{n-1})\)\(y_n\)

First we want to figure out what you need in the n column. The point that we’re given that we start at is, \(x=0\). So we’re starting at \(y(0)\). And what we’re trying to estimate is \(y(1)\). That tells us using the given step size of 0.2, we’re going to start with \(x=0\) and use Euler’s method to first estimate, what the y value is of this solution when \(x=0.2\). Then we’re going estimate what the y value is when \(x=0.4\), then 0.6, then 0.8, and finally when \(x=1\).

To put it in a more formulaic approach, we would take our ending x value minus the starting x value and divide by the step size.

$$n=\frac{x_n – x_0}{step \ size}=\frac{1-0}{0.2}= 5$$

Well, doing this, is going tell us that we need five steps to get from our starting point to our end. So our n column will have one, two, three, four, and five, because that would represent the five, individual steps that we have to take to get up to \(x=1\) from \(x=0\).

n\(x_{n-1}\)\(y_{n-1}\)\(F(x_{n-1}, y_{n-1})\)\(y_n\)

How to Apply Euler’s Method

Now that we have set up our table, we can start applying Euler’s Method to fill the table out. First of all, we need to start with the x and y value that you’re given. We know when \(x=0\), \(y=1\). So you’re just going to start with those in the \(n=1\) row and the \(x_{n-1}\) and \(y_{n-1}\) columns.

n\(x_{n-1}\)\(y_{n-1}\)\(F(x_{n-1}, y_{n-1})\)\(y_n\)

Then what you can do, is plug these two numbers, \(x=0\) and \(y=1\) into the function that we figured out earlier.

$$F(x, y) = xy \ – x^2$$

$$F(0, 1) = (0)(1) \ – (0)^2 = 0$$

And this will go in the \(F(x_{n-1}, y_{n-1})\) column.

n\(x_{n-1}\)\(y_{n-1}\)\(F(x_{n-1}, y_{n-1})\)\(y_n\)

Now with this final column here, \(y_n\), what we can do is use this formula that we have here, which is on my calculus two study guide. This will use the previous columns along with our given step size of 0.2, which is denoted by h.

$$y_n = y_{n-1}+hF(x_{n-1},y_{n-1})$$

$$y_1 = 1+(0.2)(0) = 1$$

And then we can put this in our final column of this first row.

n\(x_{n-1}\)\(y_{n-1}\)\(F(x_{n-1}, y_{n-1})\)\(y_n\)

Now that we figured out this, we can just carry this piece down into the next column. Whatever your previous \(y_n\) was, is just gonna be your \(y_{n-1}\) in the next column.

To figure out your next \(x_{n-1}\), all you have to do is take your previous \(x_{n-1}\) and just add whatever your step size is. In this case, our step size is 0.2. We’re just going get 0.2 for \(x_{n-1}\) in the second row of our table. Doing both of these will give us:

n\(x_{n-1}\)\(y_{n-1}\)\(F(x_{n-1}, y_{n-1})\)\(y_n\)

Now Repeat This Process a Few Times

Once you fill out your entire first row, then get the \(x_{n-1}\) and \(y_{n-1}\) in your second row, the only thing to do is repeat this process. You will now plug in these two x and y values into the \(F(x_{n-1}, y_{n-1})\) to get the value in the third column. Then plug those into the formula for \(y_n\) to get the forth column. Then figure out the \(x_{n-1}\) and \(y_{n-1}\) in your third row and continue repeating until your table is full and all 5 rows are filled out. Doing this should leave you with this:

n\(x_{n-1}\)\(y_{n-1}\)\(F(x_{n-1}, y_{n-1})\)\(y_n\)

So, after we iterate through this process, all the way up to \(n=5\), we end up getting in 1.194942 in our \(y_n\) column. And that should be the answer that they wanted us to find because that should estimate \(y(1)\).

How to Apply Euler’s Method in Excel

Turns out, you can also do these Euler’s method problems using Excel or any other spreadsheet software. And it’s a lot easier and faster than doing it by hand. Watch the videos below to see how you can do this yourself to create an Euler’s method calculator to apply Euler’s method in Excel. And don’t forget to get yourself a copy of my integral calculus cheat sheet to help make the rest of your homework and exams easier and smoother!

Center of Mass Example Problems Using the Center of Mass Equation Integral

Today, we’re going to be going through some center of mass example problems. So, we’re going to sketch the region bounded by the curves and then find the exact coordinates of the centroid of that region. And the curves that we have in this first example are:

$$y=4-x^2, \ and$$ $$y=0$$

If you would prefer to watch a video of this problem, you can do so here:

Centroid vs Center of Mass

Before we jump into this first example, I do want to just point out one thing. And that is the difference between a centroid vs center of mass. The reason I wanna bring that up is because, you can see this problem is asking us to find the coordinates of the centroid. But I said I was going to show you center of mass example problems. Well, they’re pretty much the same thing in most contexts. In this context specifically, they’re going to be the same.

Really, the only difference when you’re looking at a centroid versus a center of mass is that a center of mass is referring to the center point of some actual physical object that actually has a mass. The context that you’d usually see for that is when you have a thin plate, which is described by some functions or some region, and you want to find the center of mass of that plate. Whereas, a centroid usually comes into play where you are just described some region that exists bound between two curves on an x-y-plane.

Like this case here for example. We were just given these functions and we are looking at the region that is trapped between those functions. Since we’re looking at some region, “centroid” would be the proper terminology there. But if you’re ever given some uniform density object like a thin plate, for example, the centroid and the center of mass are actually going to be the same thing. So you would get the same point whether you were thinking of it in either context. They are going to use the same formulas to figure those out.

So that brings me to the center of mass equation integrals, which are two equations that are on my calculus 2 study guide. If you haven’t checked that out you can click here to learn more about that. You can go download that right away. It’s only a few bucks, it’s pretty affordable. And I highly recommend you grab yourself a copy of that. It’s available right away, so you can go start using that today. Before I show you how to apply the formulas on my study guide though, let’s go ahead and start with graphing the given curves.

Sketch the Given Curves and the Bounded Region

First we will start with \(y=4-x^2\). This is just going to be a downward facing parabola with the vertex at the point (0, 4). Then, the line \(y=0\) is going to be a horizontal line on the x-axis. Therefore, we would get a region like the one below.

So once you’ve sketched your region and kind of given yourself a visualization of what we’re trying to do here, the best place to go from there is to just go straight into the center of mass equation integrals.

Center of Mass Equation Calculus

There’s a separate equation for the x-coordinate of the centroid and for the y-coordinate of the center of mass. Those equations, from my calculus 2 study guide are:

$$\bar{x} = \frac{1}{A} \int_a^b x f(x) \ dx$$ $$\bar{y} = \frac{1}{A} \int_a^b \frac{1}{2} \Big[ f(x) \Big]^2 \ dx$$

Where the centroid of the region will be at the point \(( \bar{x}, \ \bar{y} )\).

Before I show you how to use these, I do just wanna point out the different pieces of these equations. First of all, we have A in both of these equations. A is just the area of the region whose centroid, or center of mass, we’re trying to find. We would first need to figure out the area between these two curves. And that’s what A would be. I’m not going to show you how to do that here, but you can see more about that by clicking here.

Then we have the bounds of our integrals, the a and b. Those bounds of the integrals are just going to be the x values that are the left and right edge of our region. So in this case, a will be -2. Meanwhile, b will be 2. And that’ll be true for both of those integrals.

Finally, we have f(x). That is just going to be the function that creates this region. These functions assume that the lower bound of the region will be formed by the line \(y=0\). Based on that, f(x) is just going to be the top function, \(y=4-x^2\).

You can simply use those pieces in the formulas above, and I’ll show you how to do that shortly. However, before we do that I do want to point out one thing.

Finding the Center of Mass of a Symmetrical Region

This is an interesting example, because you can see this region whose centroid we are looking for, is actually symmetrical in the x direction. This region is symmetrical to the right and to the left of the y-axis. Whenever you have symmetry in your region that actually saves you some work. Since we have symmetry in the x direction, that tells us that the x coordinate of our centroid must be on that line of symmetry, which is the line \(x=0\). As a result, we already know that we’ll have \(\bar{x} = 0\).

Since we already know \(\bar{x}=0\), all we need to do is use the above formula to calculate \(\bar{y}\).

How to Apply the Center of Mass Formula

If you use that method shown here, you would figure out that the area of this region is \(\frac{32}{3}\). And like I said earlier, the bounds of the integral are the left edge and the right edge of this area. So that gives us \(a=-2\) and \(b=2\). I also mentioned above that we will know that \(f(x)=4-x^2\). Plugging this into the \(\bar{y}\) equation tells us:

$$\bar{y} = \frac{1}{32/3} \int_{-2}^{2} \frac{1}{2} \Big[ 4-x^2 \Big]^2 \ dx$$

I do want to point out something important about the above equation. When you are applying these equations you put the f(x) all in brackets or parentheses, because we need make sure to square this whole function. From here we can simplify things a bit. When you have a fraction in the denominator of another fraction like we do here, you want to keep in mind that dividing is the same as multiplying by its reciprocal. Therefore, \(\frac{1}{32/3}\) can be rewritten as \(\frac{3}{32}\).

Then we can expand and simplify the rest of the integral.

$$\bar{y} = \frac{3}{32} \cdot \frac{1}{2} \int_{-2}^{2} (4-x^2)(4-x^2) \ dx$$

$$\bar{y} = \frac{3}{64} \int_{-2}^{2} 16-8x^2+x^4 \ dx$$

$$\bar{y} = \frac{3}{64} \Bigg[ 16x \ – \frac{8}{3}x^3+ \frac{x^5}{5} \Bigg]_{-2}^2$$

$$\bar{y} = \frac{3}{64} \Bigg[ \Bigg( 16(2) \ – \frac{8}{3}(2)^3+ \frac{(2)^5}{5} \Bigg) – \Bigg( 16(-2) \ – \frac{8}{3}(-2)^3+ \frac{(-2)^5}{5} \Bigg) \Bigg]$$

$$\bar{y} = \frac{3}{64} \cdot \frac{512}{15}$$

$$\bar{y} = \frac{8}{5}$$

That tells us that the y-coordinate of our centroid of this region is \(\bar{y}=\frac{8}{5}\). And we already figured out that the x-coordinate of our centroid was \(\bar{x}=0\). Therefore, the centroid of this region between these two given functions is going to be \((0, \ \frac{8}{5})\).

Again, the center of mass equations are on my calculus two study guide. You can click here to check that out and get your copy today!

More Center of Mass Example Problems

How to find the work required to pump the water out of the tank

In this post, I am going to be showing you how to find the work required to pump the water out of the spout.  Work is a common topic in calculus 2, and there are a lot of different applications for it.  But finding the work required to pump the water out of a tank is one of the most common applications.

It is also important to keep in mind that the process is slightly different depending on whether your tank is measured in feet or inches versus meters.  So, I will show you how both work out.  But keep in mind that the process is extremely similar except for one main difference, which I will talk more about more soon, and the units of course.

Find the work required to pump the water out of the spout – Meters

If you are given some sort of a tank like in this case, a spherical tank that we can see has a radius of 3 meters.  And then there is the spout sticking out the top of it, which is 1 meter long.  

This is going to use one of the formulas mentioned on my calculus 2 study guide.  You can click here to check that out, but you can go download that right away.  It is available for instant download; it will be a PDF that you can print or save.  It is only a couple bucks, so it is very affordable, but this is one of the formulas on there.

The General Strategy

When it comes to figuring out the work required to pump water out of a tank, really what that comes down to is setting up an integral which represents the work required to do this.  But when you are setting that integral up, you have to go about it step-by-step and work your way through the different steps.  We are not going to go straight to the formula for work quite yet.  What we want to do first is imagine, as water is being pumped out of this tank, what is going to be happening is, you can imagine a bunch of little disks.  You can see one such disk in the image below.  

Each little disk is basically an infinitely thin cylinder, which represents all the water that sits in that layer of our tank.  So, you can kind of imagine, instead of thinking of this as a sphere, think of it as a bunch of really thin cylinders stacked on top of each other that make the shape of a sphere.  And the reason why we want to think of it like this is each disk of water in this tank, is going to require a certain amount of work since all the water in that layer must be pumped up the same distance.  All the water on this layer is going to be the same distance from the top of the spout where we are trying to get that water to.  So basically, what we are going to be doing, is figuring out an equation which represents the amount of work required to pump a specific disk out of this tank.  And then we are going to sum up all those works that it takes to get each disk, and that be the work that it takes to get all the disks of water out of the tank.  

Draw a Sketch and Label Your Variables

To do this, what we want to do, is come up with a new variable, which represents the distance that any given layer of water has to be pumped out.  That distance is going to be the distance from whatever layer of water we are looking at up to the top of the spout, which is the distance labeled \(x_i^*\).

And you can imagine, these different disks as we go throughout this whole thing, are all going to have a different distance that they need to be lifted.  The disk down at the bottom of the tank is going to have to be pumped further than the disk up at the top of the tank.  Once we have this variable that represents the distance that the ith layer has to be pumped up, what you want to do is figure out an equation for the volume of that layer.

Volume of the ith Layer

We want to come up with an equation for the ith layer of the liquid.  This is going to be based on \(x_i^*\) because, you can see as you go throughout this sphere, the radius of the individual disk changes.  The distance from the center of the disk to the edge of the disk is much shorter at the top and the bottom of this sphere, and much longer in the middle of the sphere.  In the middle, we know it is 3 meters, but closer to the top or bottom of the tank it is going to be shorter. The volume of each disk is going to be different depending on how far down into the tank you are.

Because the volume of each individual disk is just going to come from the volume of a cylinder equation, we can start with that as a template and adjust from there.

$$V=\pi r^2 h$$

The radius is going to depend on how far down into the tank we are.  So, what we need to do is come up with an equation which depends on \(x_i^*\), and represents the radius of that specific disk sitting at the depth of \(x_i^*\).  To do that we can graph this circular shape and spout on an x-y-axis.  We will say that the top of the spout is at the origin and will graph the depth from the top of the spout (\(x_i^*\)) on the x-axis, and the radius of the tank at that depth (r) on the y-axis.

What we want to do is figure out an equation for that circle.  Generally, the equation for a circle is going to be \((y-y_0)^2+(x-x_0)^2=r^2\).  Since the center of this circle is at (4, 0) and the radius of the tank is 3 m, we can plug in these values to see that the equation of this circle is


Then we can simplify this equation and solve for y, leaving us with

$$y=\pm \sqrt{9-(x-4)^2}$$

So if we want a formula for the radius of our disk we can just take the positive square root piece, since that represents the top half of the circle.  Therefore, the radius is going to be \(y=\sqrt{9-(x-4)^2}\).  But we’ll want to change the x to \(x_i^*\). So the volume of our ith disk is just going to be

$$V_i = \pi \bigg( \sqrt{9-(x_i^*-4)^2} \bigg) ^2 \ h$$

Now we need to figure out the height. Well, the height of each of these disks will simply be \(\Delta x\).  All that means is the distance that you go from one disk, or one layer, of your water to the next.  If we make this change, that tells us

$$V_i = \pi \bigg( \sqrt{9-(x_i^*-4)^2} \bigg) ^2 \ \Delta x$$

And we can simplify this a bit. 

$$V_i = \pi \Big( 9-(x_i^*-4)^2 \Big) \ \Delta x$$

Once we have the volume of the ith disk, what we needed to do is figure out the mass of that disk.

Mass of the ith Layer

Once we have found an equation for the volume of the ith layer of water in the tank, finding the mass of the ith layer is fairly straight forward. The reason for this is that the mass of the layer will just be the volume of the layer times the mass of water. Since we know the mass of water to be \(1000 \frac{kg}{m^3}\), this tells us that

$$m_i = 1000 * V_i$$

$$m_i = 1000 \pi \Big( 9-(x_i^*-4)^2 \Big) \ \Delta x$$

Force Acting on the ith Layer

Again, finding the force acting on the ith layer is pretty simple once we know the mass of the ith layer. This is because the force is mass times gravity. Or in other words

$$ F_i = g * m_i $$

Since we know the gravitational constant for the strength of gravity on Earth is \(9.8 \frac{m}{s^2}\), we just have to multiply the mass of the ith layer by 9.8 to get the force acting on the ith layer.

$$F_i = 9800 \pi \Big( 9-(x_i^*-4)^2 \Big) \ \Delta x$$

Work Required to Pump the ith Layer Out of the Spout

Now that we know the force acting on the ith layer, we can use this to find the work required to pump the ith layer of water up and out of the spout. This is where the formula on my calculus 2 study guide comes in. That formula says that work is force times distance.

Since we already know the force of the ith layer, the only thing left to figure out is the distance that the ith layer needs to be pumped. Well, if we look back up to the drawing where we named our variables, you will see that \(x_i^*\) represents the distance between the ith layer of water and the top of the spout. So \(x_i^*\) is the distance that the ith layer needs to be pumped. So if we know that

$$ Work \ = \ Force \ * \ Distance$$

And that \(x_i^*\) is the distance that the ith layer needs to be pumped, then

$$W_i = F_i \ * \ x_i^*$$

$$W_i = 9800 x_i^* \pi \Big( 9-(x_i^*-4)^2 \Big) \ \Delta x$$

Total Work

At this point we only know the work required to lift the ith layer, not the work that is required to lift all the water out.  What we need to do now is use this to set up an integral which would give us the total amount of work to lift all the i layers, which is all the water.  To do that we can set up an integral. And we are going to integrate this work that it takes to lift the ith layer.  Basically, what the integral is doing is summing up all the amounts of work that it takes to lift each individual layer. It is adding all those up together to give us one total amount of work that it takes to pump all the water out of the spout.

When you put it in terms of an integral, this \(\Delta x\) changes to a dx.  We would also need to change the \(x_i^*\) to x.  This change of variable just changes us from being in the context of a sum to the context of an integral, which is just a special type of an infinite sum itself. 

$$\int 9800 x \pi \Big( 9-(x-4)^2 \Big) \ dx$$

But what about the bounds?

Now what we need to figure out is the bounds of our integral.  The bounds are going to represent the range of these x values, that we want to integrate over.  To do this we want to think about where the x came from. Again, this was the distance that we must pump our water.  What we need to figure out is: what is the range that we have to pump each layer of water?  What are the total range of distances?

Well, we can see looking back up to our drawing, that the top layer of water is already at the bottom of the spout.  It just has to be pumped up 1 meter to get to the top of the spout.  So, the shortest distance we are going to have to pump is 1 meter. That tells us that the lower bound of our integral is going to be 1.

The very, very bottom bit of water down at the bottom of our tank is going to have to be pumped all the way up through the tank and then all the way up through the spout.  If the radius of our sphere is 3 meters, it is going to have to go 3 meters to get up to the center of our sphere, another 3 meters to get up to the top of the sphere, and then another 1 meter to get to the top of the spout.  So, that is going to be \(3 + 3 + 1 = 7\) total meters.  That tells us that the upper bound is going to be 7.  

$$\int_1^7 9800 x \pi \Big( 9-(x-4)^2 \Big) \ dx$$

So now we can integrate this and that would give us the total work that it would take to pump all the water out of the spout.

$$9800 \pi \int_1^7 x \Big( 9-(x-4)^2 \Big) \ dx$$

$$9800 \pi \int_1^7 x \Big( 9-(x-4)(x-4) \Big) \ dx$$

$$9800 \pi \int_1^7 x \Big( 9-(x^2-8x+16) \Big) \ dx$$

$$9800 \pi \int_1^7 x \Big( -x^2+8x-7) \Big) \ dx$$

$$9800 \pi \int_1^7 -x^3+8x^2-7x \ dx$$

This can be done using the power rule, then evaluating over our bounds of 1 to 7, we get \(1,411,200 \pi\). So, we know that it would take \(1,411,200 \pi\) Joules worth of work to pump all of the water out of the spherical tank.

So, like I said, this is one of the formulas on the Jake’s Math Lessons calculus 2 study guide, click here to go check that out and download your copy today.

Find the work required to pump the water out of the spout – Feet and Pounds

Is Cady Right, or Does the Limit Exist?

I recently watched the movie Mean Girls. At the end of the movie, there is a scene where the main character is shown a limit and asked to evaluate it. After quickly working out the problem in a tight competition for the academic decathlon, Cady looks up from her paper and shouts, “THE LIMIT DOES NOT EXIST!”

And of course, being the math oriented person that I am, I just was left wondering whether the limit actually exists after Mean Girls concluded. So I figured I’d share my findings.

First of all, here’s the limit shown at the end of Mean Girls: $$\lim_{x \to 0} \ \frac{ln(1-x) \ – sin(x)}{1-cos^2(x)}$$

Where do we start?

Typically when I’m evaluating limits, I like to assume that the function is continuous at the point we’re evaluating the limit and just plug it in. This usually doesn’t work, but it will frequently give us a hint as to which method we can use to evaluate it. This basically just takes advantage of the basic limit properties of limits if it works out. But we need to make sure we’re not causing any problems when we do this.

So let’s just start with plugging in zero for x in the function who’s limit we’re looking for.

$$ f(x) = \frac{ln(1-x) \ – sin(x)}{1-cos^2(x)}$$ $$f(0)=\frac{ln(1-0) \ – sin(0)}{1-cos^2(0)}$$ $$f(0)=\frac{ln(1-0) \ – sin(0)}{1- \big( cos(0) \big)^2}$$ $$f(0)=\frac{0 \ – 0}{1- 1} = \frac{0}{0}$$

Turns out, this doesn’t really work this time. Because we end up with the indeterminate form of \(\frac{0}{0}\). Since it’s never fine to divide by zero, this isn’t allowed.

So, we’ll need to think of another way to evaluate this limit. But like I said before, the fact that we got this indeterminate form gives us a hint of how we can evaluate this limit properly. This indeterminate form actually is one of the conditions that tells us we can evaluate this limit using L’Hospital’s Rule.

L’Hospital’s Rule

Which means we can create a new limit. We will still have \(x \to 0\) in our new limit. But we’ll take the limit of a different function. And hopefully this one will be easier to evaluate.

This new limit will actually just be made up of a fraction where the top of the fraction is just the derivative of the original numerator. And the bottom of this new faction is just the derivative of the denominator of the original fraction. So we know that $$\lim_{x \to 0} \ \frac{ln(1-x) \ – sin(x)}{1-cos^2(x)} \ = \ \lim_{x \to 0} \ \frac{\frac{d}{dx} \big[ ln(1-x) \ – sin(x) \big] }{\frac{d}{dx} \big[ 1-cos^2(x) \big] }$$

Remember, we are not finding the derivative of the fraction as a whole, so we should not use the quotient rule. We will need to apply the chain rule to find the derivative of a few of these terms. Doing so tells us that $$\lim_{x \to 0} \ \frac{ln(1-x) \ – sin(x)}{1-cos^2(x)} \ = \ \lim_{x \to 0} \ \frac{ – \ \frac{1}{1-x} \ – \ cos(x) }{ 2cos(x) \cdot sin(x) }$$

Now can we evaluate this limit?

The point of using L’Hospital’s Rule is that we should end up with a limit that’s easier to evaluate. So, let’s try the same thing we did earlier and see what happens. Since we have a limit as \(x \to 0\), let’s just plug zero in for x and see what we get. $$\lim_{x \to 0} \ \frac{ – \ \frac{1}{1-x} \ – \ cos(x) }{ 2cos(x) \cdot sin(x) }$$ $$\frac{ – \ \frac{1}{1-(0)} \ – \ cos(0) }{ 2cos(0) \cdot sin(0)}$$ $$\frac{ – \ 1 \ – \ 1 }{ 2(1)(0)} = \frac{-2}{0}$$

And you can see we’ve divided by zero. So, this isn’t going to work. You can’t divide by zero, it breaks the rules of math. Therefore, we can’t just evaluate this limit by plugging in zero for x.

However, we are getting closer. The reason I say this is that we don’t have the indeterminate form of \(\frac{0}{0}\) anymore. Since we have some other number divided by zero, that tells us that this limit will likely be either \(\infty\) or \(– \infty\).

The reason for this is that the numerator of the fraction is going toward the number -2. Whether you approach from the left or the right of x = 0, the top of our fraction is going to be a number close to -2.

Meanwhile, as x gets really, really close to 0, the denominator is going to also get really close to 0. But we don’t care about what the denominator is when x = 0. Since we’re dealing with a limit we care about the denominator when x is really close to 0. But depending on which side of zero we’re on, the denominator could be positive or negative.

If we have a fraction where the numerator is some non-zero number, and the denominator is getting infinitely close to zero, the fraction as a whole will become infinitely large. We just need to figure out if it’s positive or negative. Well, we can figure this out by splitting the limit up into two one-sided limits and see what those tell us about the two-sided limit.

Left-Sided Limit

Let’s start with the limit where x is approaching zero from the left. $$\lim_{x \to 0^-} \ \frac{ – \ \frac{1}{1-x} \ – \ cos(x) }{ 2cos(x) \cdot sin(x) }$$ We already know that the numerator of this fraction is going to approach -2 as x approaches 0 from either side. So, let’s just look at the denominator of this fraction.

What happens to \(2cos(x)sin(x)\) as \(x \to 0\)? Well, we already said it will approach 0, but let’s just consider what’s going on as x approaches 0 from the left. If we’re approaching 0 from the left, that means we want to consider x values that are super close to 0, but will be negative. For negative x values approaching 0, cos(x) will approach 1, and will be slightly smaller than 1. And sin(x) will approach 0, and will be negative numbers very close to 0.

This is because sin(x) is negative for x values very close to 0. We can see this looking at a graph of \(f(x)=sin(x)\).

Graph of f(x) = sin(x)

Based on this, as x approaches 0, 2cos(x)sin(x) will become the product of 2, 1, and a negative number very close to 0. The product of two positive numbers and a negative number will be a negative number. So we know that this denominator will be getting closer and closer to 0, but will be a negative number in this left sided limit.

So we can think of the fraction as a whole, as a positive number very close to 2, divided by a negative number very close to 0. As x goes to 0 from the left, this fraction will get infinitely large and will be negative because it’s a positive divided by a negative. In other words, as \(x \to 0^-\), \(\frac{ – \ \frac{1}{1-x} \ – \ cos(x) }{ 2cos(x) \cdot sin(x) } \to \frac{2}{-0}\). Or $$\lim_{x \to 0^-} \ \frac{ – \ \frac{1}{1-x} \ – \ cos(x) }{ 2cos(x) \cdot sin(x) }=-\infty$$

Right-Sided Limit

The right-sided limit will work out very similarly, but with one main difference. $$\lim_{x \to 0^+} \ \frac{ – \ \frac{1}{1-x} \ – \ cos(x) }{ 2cos(x) \cdot sin(x) }$$ Again, the numerator of this fraction is going to approach -2 as x approaches 0 from the right. But let’s look at the denominator.

By the same process as the left-sided limit above, we can see that the denominator of this fraction is going to approach 0. But what we need to figure out is whether it is going to be approaching 0 from the negative side or the positive side. And the only term of our denominator that is going to be different approaching from the right side of 0, is sin(x).

Looking back up at the graph of \(f(x)=sin(x)\) you can see that the function is positive (above the x axis) to the right of \(x=0\). Therefore, the denominator of this fraction is going to be the product of three positive numbers, resulting in a positive number. And the fraction as a whole will be a positive number over a positive number. In other words, as \(x \to 0^+\), \(\frac{ – \ \frac{1}{1-x} \ – \ cos(x) }{ 2cos(x) \cdot sin(x) } \to \frac{2}{+0}\). Or $$\lim_{x \to 0^+} \ \frac{ – \ \frac{1}{1-x} \ – \ cos(x) }{ 2cos(x) \cdot sin(x) }=\infty$$

What does this tell us about the two-sided limit?

Remember, for a limit to exist both one-sided limits need to exist AND they both need to be equal to each other. We just figured out that our left-sided limit is \(-\infty\) and the right-sided limit is \(\infty\). Since one is positive and one is negative, they clearly aren’t equal. Each one-sided limit does not give the same result. Therefore, the limit we are trying to find indeed does not exist.

So, it turns out Cady was right in the end of Mean Girls. The limit does not exist.

The Calculus Lifesaver by Adrian Banner Review

Taking a very causal and easy to understand approach, Banner has created a complete guide for any introductory calculus student.  This book really does have all the tools you need to excel at calculus.  It is titled appropriately I would say. 

More important than that though, is that this book is put into simple terms making it easy to understand.  It is common to see calculus textbooks that use technical mathematical language to explain complicated concepts.  The Calculus Lifesaver: All the Tools You Need to Excel at Calculus (Princeton Lifesaver Study Guides) by Adrian Banner is not one of those books.  Adrian Banner uses casual language that is easy to understand.  I think this is important because anyone that is trying to learn calculus topics for the first time would not be an expert on the technical jargon in order to make sense of the concepts as they are described in some other textbooks.

How much does The Calculus Lifesaver cost?

The Calculus Lifesaver is priced very reasonable.  Below is the pricing available at the time of this writing, but you can confirm the updated cost on Amazon by clicking here. 

You can purchase both the e-book and paperback version of this book on Amazon for under $20.  The price for ebook and paperback tend to stay fairly consistent, whereas the hardback price really ranges. If you prefer hardback instead, it will cost you a little bit more, coming in between $20 – $80.  If you want to get access to this book for even less, Amazon does offer it used and to rent if you only need it for the term you are taking a calculus class.

Who is this book not helpful for?

Although this casual approach can be great for someone learning the basic concepts on which calculus is built, this could be a negative for a math major who will need to go more in depth or someone trying to develop a deeper understanding of the theory or thought behind the math.  If you are interested in proofs and understanding how calculus was derived, this probably is not the book for you.

Another downside of this book is that it does not contain collections of problems at the end of each chapter.  It is not packed full of practice problems for you to practice the concepts discussed in the chapters.  There are certainly problems that are solved by Banner throughout the book, but there is not a ton of problems that you would be able to do on your own.  It is more of an explanation of the concepts you need to know as well as an explanation of how to apply them.  Then you would be left on your own to find problems that you can get some practice with.  It does fantastic job at breaking down all the tools you need to know to excel at calculus and how to apply them, then sends you on your way to go get the repletion you need elsewhere.

Fortunately, there are other options out there to get the list of practice problems.  One option could be to look in the required textbook for your course if you are enrolled in one.  If you are not taking a calculus class though, there are other books that you can get that are just books of practice problems.  If you pair one of those with The Calculus Lifesaver, you should be set to make sure you know the concepts you need and get the practice to really get it down solid.

Who is this book perfect for?

Like I mentioned before, Banner takes a very casual approach in this text.  He does not focus on the technical mathematical terminology that most textbooks focus on much more.  This fact is certainly a positive for someone learning calculus for the first time.  If math is not your major and you are taking a calculus class for general requirements this could be the perfect book for you.  It’s the perfect bridge to get you from being new to calculus to understanding the complex explanations in the textbook you may have already had to buy.

For example, at one point in this book, Banner writes, “perhaps you’d like to say that f(2)=1, but that would be a load of bull since 2 isn’t even in the domain of f.”  This is just one example that illustrates the casual approach Banner takes in The Calculus Lifesaver.  And there are many more.

And I am not trying to say that the technical terminology in math is not important.  I think it certainly is.  But it is usually helpful to understand the concepts before trying to build on that with a more in depth understanding of the language and terminology.  When you are learning about a brand-new topic in math, it can be easy to get distracted with the terms.  And this can prevent you from putting more focus on the general concepts that you are trying to understand.  This may make you feel like you don’t understand the concepts you are trying to learn, when in reality you would understand the concepts it they were explained in terms you already understand.

This pickle is completely avoided thanks to the casual approach in The Calculus Lifesaver.  Banner ensures that the language is simple and straight forward so you can easily understand the thinking behind the actual math.  It is done brilliantly.

What topics are covered in The Calculus Lifesaver by Adrian Banner?

The Calculus Lifesaver covers topics that you need to know in calculus 1, 2, and 3.  You know you will really be able to get some longevity out of this book if you need to take multiple calculus classes.  It’s always great when you can buy one book that can be used to help you through multiple courses.  This is not a comprehensive list, but some of the main important topics covered by Banner in this book are:

  • Functions and review of prerequisite material
  • Limits and techniques for evaluating them
  • Continuity
  • Derivatives and different methods to find them
  • Optimization and linear approximation
  • Implicit differentiation and related rates problems
  • Definite and indefinite integrals and how to find them
  • The Fundamental Theorem of Calculus (FTC)
  • Improper integrals
  • Basic concepts of sequences and series
  • Taylor Polynomials, Taylor Series, and Power Series
  • Polar coordinates and how they relate to topics of calculus
  • Volumes, arc length, and surface area
  • Differential equations

Final Recommendations

I strongly recommend this book for anyone that is a non-math major taking calculus classes because they need to for their major.  I would also recommend this book for any high school students taking AP Calculus AB or BC or taking IB Math SL or HL.  It may be more applicable for an IB Math HL student than SL, but it would certainly be helpful for both.  I think this book would also be immensely helpful for someone who is trying to learn calculus without having enrolled in a high school or college calculus class.  The casual approach is perfect for anyone that is trying to get a grip on the basic concepts taught in calculus and how to apply them.  Click here to go get yourself a copy of The Calculus Lifesaver.

However, if you are a math major or are interested in learning more about the ideas behind calculus or proving the concepts that make up calculus, this may not be the book for you.  This is certainly not a proof-based resource and does not contain a ton of practice problems.  So if you are looking to really dive deep into calculus, you may want to consider Calculus by Michael Spivak, which would be my personal recommendation for a proof-based approach to calculus.

Some links contained in this post are affiliate links, meaning I would get a small commission for your purchase at no additional cost to you.

How to Find the Integral of e^x+x^e

$$\int e^x + x^e \ dx$$

Finding the integral of \(\mathbf{f(x)=e^x+x^e}\) can be tricky at first glance. I’m sure you’re probably familiar with how to take the integral of the \(\mathbf{e^x}\) part of it. In general, you’ll just want to remember that $$\int e^x \ dx = e^x$$

However, the \(\mathbf{x^e}\) piece looks a little weird. At first glance it may even look completely foreign. What have you seen that looks like this piece of the function?

Let’s think about what’s going on here

If we look back at our original integral, you’ll want to notice the dx at the end of it. Remember we had $$\int e^x + x^e \ dx$$

The dx is important because it indicates what letter is our variable that we will be integrating with respect to. Since it’s dx, that means we will be integrating with respect to x. Therefore, e will need to be treated as a constant.

In fact, e is a known constant with a specific value. It’s kind of like \(\mathbf{\pi}\). We know that \(\mathbf{e \approx 2.71}\). So when we are trying to integrate the \(\mathbf{x^e}\) part of this function, what we are integrating just comes down to “a variable raised up to a constant power.”

When you are trying to integrate x raised up to some constant power, you would want to use the power rule. The power rule for integrating tells us that if n is some constant other than n = -1, then $$\int{x^n} \ dx \ = \ \frac{x^{n+1}}{n+1} \ = \ \frac{1}{n+1} \cdot x^{n+1}$$

So since e is a constant, we can basically just replace the n in the above formula with e to find the integral of \(\mathbf{x^e}\). Using this, we can see that $$\int{x^e} \ dx \ = \ \frac{x^{e+1}}{e+1} \ = \ \frac{1}{e+1} \cdot x^{e+1}$$

Putting these integrals together

Now that we have figured out how to integrate the \(\mathbf{x^e}\) part of our function, let’s go back to the original integral. As we do this, let’s also think about one of the basic integral properties. Specifically, the one that tells us what to do about integrating a function that is a sum of two simpler functions. $$\int f(x)+g(x) \ dx \ = \int f(x) \ dx + \int g(x) \ dx$$

So as a result of this, we can break down our problem into two simpler integrals that we already know. $$\int e^x + x^e \ dx \ = \int e^x \ dx + \int x^e \ dx$$

And since we already found both of these integrals earlier, we know $$\int e^x + x^e \ dx \ = \ e^x + \frac{x^{e+1}}{e+1} + C$$

Linear Approximation (Linearization) and Differentials

Linear approximation, sometimes called linearization, is one of the more useful applications of tangent line equations. We can use linear approximations to estimate the value of more complex functions. Coming up with a linear function that closely approximates another function at a certain point gives you something that is a lot easier to work with than the original function.

How to find a linear approximation at a point

To find the linear approximation of a function at a point, you can simply use the formula for the linearization of a function. Let’s say you are given a function $$f(x)=x^3+2x$$ and you want to find its liner approximation at the point \(\mathbf{a=-2}\). You can do this by applying the formula


The first step is to find the derivative of f(x). In this case we can find f'(x) by using the power rule.


Now that you know f(x), f'(x), and the value of a, you can plug all of this into the linearization formula above to find the linear approximation of f(x) near x=a.

$$L(x)=f(a)+f'(a)(x-a)$$ $$L(x)=\big( (-2)^3+2(-2) \big)+ \big( 3(-2)^2+2 \big) \big( x-(-2) \big)$$ $$L(x)=\big( -12 \big)+ \big( 14 \big) \big( x+2 \big)$$ $$L(x)=-12 + 14x+28$$ $$L(x)=14x+16$$

Useful Applications of Linear Approximation

At this point you’re probably thinking, “this is just finding tangent line equations, who cares?”

But this does have some useful applications. One such application is using linear approximation to estimate the value of numbers that would be difficult or impossible to find without a calculator.

Let me show you what I mean by that.


Find the linearization of \(\mathbf{f(x)=\sqrt{x+1}}\) at a=0 and use it to approximate \(\mathbf{f(x)=\sqrt{0.9}}\).

Finding \(\mathbf{f(x)=\sqrt{0.9}}\) would be difficult without a calculator, right? But with linear approximation we can get pretty close by applying the process above and taking it a step further pretty easily.

We already have been given f(x) and the a value we need, so you just need to find f'(x) to apply our linearization formula.

$$f(x)=\sqrt{x+1}$$ $$f(x)=(x+1)^{\frac{1}{2}}$$

Writing f(x) in this form, we can simply apply the power rule and chain rule to find f'(x).

$$f'(x)=\frac{1}{2}(x+1)^{-\frac{1}{2}}$$ $$f'(x)=\frac{1}{2\sqrt{x+1}}$$

Now that we know f'(x), let’s first use that and f(x) to calculate f(a) and f'(a) before applying all of this to the linearization formula. Remember we were given a=0.

$$f(x) = \sqrt{x+1}$$ $$f(0)=\sqrt{0+1}$$ $$f(0)=\sqrt{1}$$ $$f(0)=1$$

And now you can find f'(a), or f'(0).

$$f'(x)=\frac{1}{2\sqrt{x+1}}$$ $$f'(0)=\frac{1}{2\sqrt{0+1}}$$ $$f'(0)=\frac{1}{2\sqrt{1}}$$ $$f'(0)=\frac{1}{2}$$

Now we can plug all of this into our linearization formula.

$$L(x)=f(0)+f'(0)(x-0)$$ $$L(x)=1+\frac{1}{2}x$$

How do you use this to estimate a number?

So we know that the function \(L(x)=1+\frac{1}{2}x\) is a good estimate of \(f(x)=\sqrt{x+1}\) when we plug in numbers close to a=0 for x. And if we plug x=0 into f(x), that would give us \(f(0)=\sqrt{0+1}=\sqrt{1}\) which is close to the number we are trying to estimate, \(f(x)=\sqrt{0.9}\).

In reality, we could find the exact value of \(\sqrt{0.9}\) by evaluating \(f(-0.1)=\sqrt{-0.1+1}=\sqrt{0.9}\). But this is difficult, so instead we can use our linear approximation because we know it’s close to f(x) for x values near x=0. So instead of finding f(-0.1) we can find L(-0.1) and that will give us a good estimate.

$$L(-0.1)=1+\frac{1}{2}(-0.1)$$ $$L(-0.1)=1+(0.5)(-0.1)$$ $$L(-0.1)=1-0.05$$ $$L(-0.1)=0.95$$

So this tells us that \(\sqrt{0.9} \approx 0.95\).

What if you aren’t given a function f(x) or an x=a value to use?

This seems nice to be able to estimate complicated values using this technique, but what if you need to estimate a complex value and aren’t given a function to use. Sometimes you aren’t given a function. And if you were trying to use this technique in the real world you probably wouldn’t be given a nice function to use and an a value that’s close to the input you need to estimate.

So how do you deal with this?

Well, the short answer is that you need to come up with the function and the a value on your own. Then once you have these you can apply the same technique above. Let me show you what I mean.

Let’s say you are told:

Use linear approximation to estimate \(\sqrt{24}\).

The first thing you want to do is come up with the function to use to apply the linearization formula to. Since we are trying to find \(\sqrt{24}\), our function is clearly going to need a square root in it somewhere. It is possible that you may need to experiment a bit and see how it works out, so let’s just start with the most obvious choice for now and say \(f(x)=\sqrt{x}\).

If we do say \(f(x)=\sqrt{x}\) then we can see that \(f(24)=\sqrt{24}\) which is exactly the number that we are trying to estimate. But f(24) is hard to evaluate. So to find the a value we will want to use, you should consider what number is near 24 that we could plug into the function \(f(x)=\sqrt{x}\) and easily figure out the result?

The closest number to 24 that we can easily plug into our function would be 25. Because 25 is a perfect square, we know that \(f(25)=\sqrt{25}=5\), which is a nice round number. This is perfect for linear approximation because we need an input that is near the location we are trying to estimate whose output we know.

Since 25 is near 24 and we know the exact value of f(25), we can find the linear approximation of \(f(x)=\sqrt{x}\) at a=25 and use this to estimate \(f(24)=\sqrt{24}\) just like we did in the example above.

I’m not going to work this all the way through because it will be the exact same process as the last example now that we know \(f(x)=\sqrt{x}\) and a=25. You can also see the rest of the solution to this problem in the video above.

Differentials and how to find dy

Differentials go hand-in-hand with linear approximation and they have some interesting applications of their own.

Given some function f(x), you can find its differential, dy, simply by using the following formula.

$$dy=f'(x) \ dx$$

For example, say you are given the function \(y=e^{\frac{x}{10}}\) and you are told to find the differential dy. All you need to do is apply the above formula.

You know that $$f(x)=e^{\frac{x}{10}}$$ Therefore, you can apply the chain rule to find $$f'(x)=e^{\frac{x}{10}} \cdot \frac{1}{10}$$ $$f'(x)=\frac{1}{10}e^{\frac{x}{10}}$$

So as a result, we know that

$$dy=\frac{1}{10}e^{\frac{x}{10}} \ dx$$

Application of Differentials: Estimating Error

Estimating error is one of the more common uses for differentials. This can then be used to find the percentage error of a measurement. Let me explain what this means with an example.

Let’s say you measure a sphere to have a radius of 5 m. However, you know that the instrument you used to measure the radius of this sphere could have up to 5 cm (or 0.05 m) of error. Use differentials to estimate the maximum error in the measured volume of this sphere.

Knowing the the volume of a sphere is $$V=\frac{4}{3}\pi r^3$$ we will use this as our function. We will be able to use the differential of this function to estimate the maximum possible error in the measured volume of this sphere based on the maximum possible error in the radius. We already know the possible error in the radius, so we can use this and relate it to the volume.

First all we need to do is find the differential of our volume equation. This will require taking the derivative of \(\mathbf{V=\frac{4}{3}\pi r^3}\). Using the formula of a differential as stated in the previous section, the differential is

$$dV=4 \pi r^2 \ dr$$

Then with this, all you need to do is plug in the information we know to find the possible error in the volume. Keep in mind, r represents the radius of the sphere that we know to be 5 m. And dr will represent the possible error in the radius, which we know to be 0.05 m. It’s important that we use the same units for all of these inputs since the output will use the same units in that case.

$$dV=4 \pi (5m)^2(0.05m)$$ $$dV=5 \pi m^3$$

So we know that the maximum error in the measurement we have for the volume of this sphere is \(\mathbf{5 \pi m^3\approx 15.708m^3}\).

Percentage Error

Once we find the maximum possible error as outlined above, we can use this to find the percentage error of our measurement. This is simply the maximum possible error in the measurement divided by the measurement itself. So in this case it would be

$$Percentage \ Error = \frac{error \ in \ volume}{volume}.$$

$$Percentage \ Error = \frac{5 \pi}{\frac{500}{3}\pi} = 3\%$$

Limits to Infinity

Limits as x approaches infinity can be tricky to think about. This is because infinity is not a number that x can ever be equal to. To evaluate a limit as x goes to infinity, we cannot just simply plug infinity in for x and see what we get. As a result, things like \(\mathbf{e^{\infty}}\) and \(\mathbf{\frac{1}{\infty}}\) don’t actually have a value.

So how can we deal with infinity?

Although infinity doesn’t have a specific value and can’t be plugged into functions, we can think about what will happen to a given function as x approaches infinity.

All this really means is that x is continually getting infinitely large. And as x gets bigger and bigger and bigger, what y value will our function get closer and closer to?

Let’s look at a few common examples and what they mean.

One Divided by Infinity

Like I said before, infinity is not a value. Therefore, \(\frac{1}{\infty}\) isn’t an actual number and doesn’t have a value. However, what we want to think about is what y value 1/x will approach as x goes to infinity. This is exactly what is being asked when we see: $$\lim_{x \to \infty} \frac{1}{x}$$

So let’s think about what happens to 1/x when we plug in bigger and bigger numbers for x.


So you can see in the table above that as x gets bigger and bigger, 1/x gets closer and closer to 0. Or in other words,

as x approaches infinity, 1/x approaches 0

We would write this mathematically as: $$\lim_{x \to \infty} \frac{1}{x} = 0$$

We can also see this graphically using Mathway. Notice in the graph below that as the x value goes toward infinity, you can see the y value getting closer to the y-axis (y=0).

limit as x goes to infinity of 1/x

Limits Going to Infinity

The other common example I mentioned is the limit as x goes to infinity of \(\mathbf{e^x}\). Or $$\lim_{x \to \infty} e^x$$

Again, it doesn’t really make sense to say that we can just plug infinity in for x and get \(\mathbf{e^{\infty}}\). This doesn’t actually have a value. This isn’t a number. Instead, we want to think about what y value \(\mathbf{e^x}\) goes toward as x goes to infinity. So let’s look at what happens as we raise e to a larger and larger power.

1002.688 * \(\mathbf{10^{43}}\)

So we can see here that \(\mathbf{e^x}\) starts giving us very large numbers quite quickly. And as we continue to plug in larger values for x, \(\mathbf{e^x}\) will continue to get bigger and bigger and bigger.

as x approaches infinity, \(\mathbf{e^x}\) approaches infinity

We would write this mathematically as: $$\lim_{x \to \infty} e^x = \infty$$

Rational Functions

Finding the limit as x approaches infinity of rational functions is a common limit you will run into. This is important because this is how you find horizontal asymptotes of rational functions. You are just looking to see what y value your function will get really close to (without touching that value) as your x goes to infinity.

What is a rational function?

A rational function is a function that is a fraction where the top and bottom of the fraction are polynomials. Basically this just means that the numerator and denominator of the fraction will be a sum of a handful of terms that are a constant times x raised up to some power. So it will look like this: $$f(x)=\frac{a_nx^n + a_{n-1}x^{n-1} + … + a_2x^2 + a_1x + a_0}{b_mx^m + b_{m-1}x^{m-1} + … + b_2x^2 + b_1x + b_0}$$

How do you take the limit of a rational function?

There are really only 3 cases you need to consider and the video above discusses these three cases as well. Any rational function will fall into one of these three categories, and each limit within each category will work out the same.

All you need to do is look at the degree of the polynomial on the top and bottom of the fraction. The degree of a polynomial is the highest power that x is being raised to. So for example, \(\mathbf{y=-4x^5+6x^2+x-12}\) is a polynomial of degree 5, because the highest power of x is 5.

Case 1: Degree of numerator is larger than degree of denominator

If the degree of the numerator is higher than the degree of the polynomial on the denominator, then the limit will go to infinity or negative infinity. This will only depend on the sign of the coefficient of the highest power x term on the numerator.

If Degree(P(x)) > Degree(Q(x)), then \(\mathbf{\lim\limits_{x \to \infty} \frac{P(x)}{Q(x)}= \pm \infty}\)


$$\lim_{x \to \infty} \frac{x^4-3x^2+x}{x^3-x+2}$$ $$=\lim_{x \to \infty} \frac{x^4-3x^2+x}{x^3-x+2} \cdot \frac{\frac{1}{x^3}}{\frac{1}{x^3}}$$ $$=\lim_{x \to \infty} \frac{\frac{x^4}{x^3}-\frac{3x^2}{x^3}+\frac{x}{x^3}}{\frac{x^3}{x^3}-\frac{x}{x^3}+\frac{2}{x^3}}$$ $$=\lim_{x \to \infty} \frac{x-\frac{3}{x}+\frac{1}{x^2}}{1-\frac{1}{x^2}+\frac{2}{x^3}}$$ $$= \frac{\lim\limits_{x \to \infty}x-\lim\limits_{x \to \infty}\frac{3}{x}+\lim\limits_{x \to \infty}\frac{1}{x^2}}{\lim\limits_{x \to \infty}1-\lim\limits_{x \to \infty}\frac{1}{x^2}+\lim\limits_{x \to \infty}\frac{2}{x^3}}$$ $$= \frac{\lim\limits_{x \to \infty}x-0+0}{1-0+0}$$ $$=\frac{\lim\limits_{x \to \infty}x}{1}$$ $$=\lim_{x \to \infty}x$$ $$=\infty$$

Case 2: Degree of numerator is smaller than degree of denominator

If the degree of the numerator is smaller than the degree of the denominator then the limit will go to 0.

If Degree(P(x)) < Degree(Q(x)), then \(\mathbf{\lim\limits_{x \to \infty} \frac{P(x)}{Q(x)}= 0}\)


$$\lim_{x \to \infty} \frac{16x^4}{0.0001x^5+18x}$$ $$=\lim_{x \to \infty} \frac{16x^4}{0.0001x^5+18x} \cdot \frac{\frac{1}{x^5}}{\frac{1}{x^5}}$$ $$=\lim_{x \to \infty} \frac{\frac{16x^4}{x^5}}{\frac{0.0001x^5}{x^5}+\frac{18x}{x^5}}$$ $$=\lim_{x \to \infty} \frac{\frac{16}{x}}{0.0001+\frac{18}{x^4}}$$ $$= \frac{\lim\limits_{x \to \infty}\frac{16}{x}}{\lim\limits_{x \to \infty}0.0001+\lim\limits_{x \to \infty}\frac{18}{x^4}}$$ $$= \frac{0}{0.0001+0}$$ $$=0$$

Case 3: Degree of numerator is equal to degree of denominator

If the degree of the numerator is equal to the degree of the denominator then the limit will be equal to the coefficient of the highest power x term in the numerator divided by the coefficient of the highest power x term in the denominator.

If Degree(P(x)) = Degree(Q(x)), then \(\mathbf{\lim\limits_{x \to \infty} \frac{P(x)}{Q(x)}= \frac{a}{b}} \ \) where a is the coefficient of the highest power x term in P(x), and b is the coefficient of the highest power x term in Q(x).

$$\lim_{x \to \infty} \frac{x^2+7}{-3x^2}$$ $$=\lim_{x \to \infty} \frac{x^2+7}{-3x^2} \cdot \frac{\frac{1}{x^2}}{\frac{1}{x^2}}$$ $$=\lim_{x \to \infty} \frac{\frac{x^2}{x^2} + \frac{7}{x^2}}{\frac{-3x^2}{x^2}}$$ $$=\lim_{x \to \infty} \frac{1 + \frac{7}{x^2}}{-3}$$ $$= \frac{\lim\limits_{x \to \infty}1 + \lim\limits_{x \to \infty}\frac{7}{x^2}}{\lim\limits_{x \to \infty}-3}$$ $$= \frac{1+0}{-3}$$ $$=-\frac{1}{3}$$

Other Examples

\(\mathbf{\lim\limits_{x \to \infty} arctan \big( e^x \big)}\) | Solution

\(\mathbf{\lim\limits_{x \to \infty} \frac{sin(x)}{x}}\) | Solution

\(\mathbf{\lim\limits_{x \to \infty} \frac{ln(x)}{\sqrt{x}}}\) | Solution


Example 1 Solution

\(\mathbf{\lim\limits_{x \to \infty} arctan \big( e^x \big)}\)

This is going to be based on the fact that we already discussed above that \(\mathbf{\lim\limits_{x \to \infty} e^x = \infty}\). Since we know that, we can say that \(\mathbf{y=e^x}\) and rewrite our limit as: $$\lim_{y \to \infty} arctan(y)$$

This is because y goes to infinity as x goes to infinity since \(\mathbf{y=e^x}\). Now we can find this limit by looking at a graph of y=arctan(x).

limit as x approaches infinity of arctan(x) or tan^{-1}(x)

Looking at this graph we can see that y=arctan(x) has a horizontal asymptote at \(\mathbf{y=\frac{\pi}{2}}\). As x goes toward infinity, you can see that the y value of our function gets closer and close to \(\mathbf{\frac{\pi}{2}}\). So this tells us $$\lim_{y \to \infty} arctan(y)=\frac{\pi}{2}$$ $$\lim_{x \to \infty} arctan \big( e^x \big)=\frac{\pi}{2}$$

Example 2 Solution

\(\mathbf{\lim\limits_{x \to \infty} \frac{sin(x)}{x}}\)

This one is going to use Squeeze Theorem. Click here to learn more about Squeeze Theorem and its required conditions if you don’t already know about them, then come back to this problem.

We know that \(\mathbf{-1 \leq sin(x) \leq 1}\) for all x. Since we are looking at this limit as x goes to positive infinity, we can also say that $$-\frac{1}{x} \leq \frac{sin(x)}{x} \leq \frac{1}{x}$$

We also know that \(\mathbf{\lim\limits_{x \to \infty} -\frac{1}{x}=0}\) and that \(\mathbf{\lim\limits_{x \to \infty} \frac{1}{x}=0}\). Since we know \(\mathbf{\frac{sin(x)}{x}}\) is between \(\mathbf{-\frac{1}{x}}\) and \(\mathbf{\frac{1}{x}}\) we can use Squeeze Theorem to say that $$\lim_{x \to \infty} \frac{sin(x)}{x}=0$$

Example 3 Solution

\(\mathbf{\lim\limits_{x \to \infty} \frac{ln(x)}{\sqrt{x}}}\)

For this limit, we will be able to use L’Hospital’s Rule. This is because ln(x) and \(\mathbf{\sqrt{x}}\) both go to infinity as x goes to infinity. This gives us an indeterminate form that is a possible application of L’Hospital’s Rule. We can also check to make sure that this meets the other conditions needed to apply L’Hospital’s Rule.

$$\lim_{x \to \infty} \frac{ln(x)}{\sqrt{x}}$$ $$=\lim_{x \to \infty} \frac{\frac{d}{dx}ln(x)}{\frac{d}{dx}\sqrt{x}}$$ $$=\lim_{x \to \infty} \frac{\frac{1}{x}}{\frac{1}{2x^{1/2}}}$$ $$=\lim_{x \to \infty} \frac{1}{x} \cdot \frac{2x^{1/2}}{1}$$ $$=\lim_{x \to \infty} \frac{2}{x^{1/2}}$$ $$=\lim_{x \to \infty} \frac{2}{\sqrt{x}}$$ $$=0$$

Implicit Differentiation Examples

If you haven’t already read about implicit differentiation, you can read more about it here. Once you check that out, we’ll get into a few more examples below.

\(\mathbf{1. \ \ ycos(x) = x^2 + y^2} \) | Solution

\(\mathbf{2. \ \ xy=x-y} \) | Solution

\(\mathbf{3. \ \ x^2-4xy+y^2=4} \) | Solution

\(\mathbf{4. \ \ \sqrt{x+y}=x^4+y^4} \) | Solution

\(\mathbf{5. \ \ e^{x^2y}=x+y} \) | Solution

For each of the above equations, we want to find dy/dx by implicit differentiation. In general a problem like this is going to follow the same general outline. Although, this outline won’t apply to every problem where you need to find dy/dx, this is the most common, and generally a good place to start. Start with these steps, and if they don’t get you any closer to finding dy/dx, you can try something else. Here are the steps:

  • Take the derivative of both sides of the equation with respect to x.
  • Separate all of the dy/dx terms from the non-dy/dx terms.
  • Factor out the dy/dx.
  • Isolate dy/dx.

Some of these examples will be using product rule and chain rule to find dy/dx.


\(\mathbf{1. \ \ ycos(x) = x^2 + y^2} \)

$$ycos(x)=x^2+y^2$$ $$\frac{d}{dx} \big[ ycos(x) \big] = \frac{d}{dx} \big[ x^2 + y^2 \big]$$ $$\frac{dy}{dx}cos(x) + y \big( -sin(x) \big) = 2x + 2y \frac{dy}{dx}$$ $$\frac{dy}{dx}cos(x) – y sin(x) = 2x + 2y \frac{dy}{dx}$$ $$\frac{dy}{dx}cos(x) -2y \frac{dy}{dx} = 2x + ysin(x)$$ $$\frac{dy}{dx} \big[ cos(x) -2y \big] = 2x + ysin(x)$$ $$\frac{dy}{dx} = \frac{2x + ysin(x)}{cos(x) -2y}$$

\(\mathbf{2. \ \ xy=x-y} \)

$$xy = x-y$$ $$\frac{d}{dx} \big[ xy \big] = \frac{d}{dx} \big[ x-y \big]$$ $$1 \cdot y + x \frac{dy}{dx} = 1-\frac{dy}{dx}$$ $$y+x \frac{dy}{dx} = 1 – \frac{dy}{dx}$$ $$x \frac{dy}{dx} + \frac{dy}{dx} = 1-y$$ $$\frac{dy}{dx} \big[ x+1 \big] = 1-y$$ $$\frac{dy}{dx} = \frac{1-y}{x+1}$$

\(\mathbf{3. \ \ x^2-4xy+y^2=4} \)

$$x^2-4xy+y^2=4$$ $$\frac{d}{dx} \big[ x^2-4xy+y^2 \big] = \frac{d}{dx} \big[ 4 \big]$$ $$2x \ – \bigg[ 4x \frac{dy}{dx} + 4y \bigg] + 2y \frac{dy}{dx} = 0$$ $$2x \ – 4x \frac{dy}{dx} – 4y + 2y \frac{dy}{dx} = 0$$ $$-4x\frac{dy}{dx}+2y\frac{dy}{dx}=-2x+4y$$ $$\frac{dy}{dx} \big[ -4x+2y \big] = -2x+4y$$ $$\frac{dy}{dx}=\frac{-2x+4y}{-4x+2y}$$ $$\frac{dy}{dx}=\frac{-x+2y}{-2x+y}$$

\(\mathbf{4. \ \ \sqrt{x+y}=x^4+y^4} \)

$$\sqrt{x+y}=x^4+y^4$$ $$\big( x+y \big)^{\frac{1}{2}}=x^4+y^4$$ $$\frac{d}{dx} \bigg[ \big( x+y \big)^{\frac{1}{2}}\bigg] = \frac{d}{dx}\bigg[x^4+y^4 \bigg]$$ $$\frac{1}{2} \big( x+y \big) ^{-\frac{1}{2}} \bigg( 1+\frac{dy}{dx} \bigg)=4x^3+4y^3\frac{dy}{dx}$$ $$\frac{1}{2} \cdot \frac{1}{\sqrt{x+y}} \cdot \frac{1+\frac{dy}{dx}}{1} = 4x^3+4y^3\frac{dy}{dx}$$ $$\frac{1+\frac{dy}{dx}}{2 \sqrt{x+y}}= 4x^3+4y^3\frac{dy}{dx}$$ $$1+\frac{dy}{dx}= \bigg[ 4x^3+4y^3\frac{dy}{dx} \bigg] \cdot 2 \sqrt{x+y}$$ $$1+\frac{dy}{dx}= 8x^3 \sqrt{x+y} + 8y^3 \frac{dy}{dx} \sqrt{x+y}$$ $$\frac{dy}{dx} \ – \ 8y^3 \frac{dy}{dx} \sqrt{x+y}= 8x^3 \sqrt{x+y} \ – \ 1$$ $$\frac{dy}{dx} \bigg[ 1 \ – \ 8y^3 \sqrt{x+y} \bigg]= 8x^3 \sqrt{x+y} \ – \ 1$$ $$\frac{dy}{dx}= \frac{8x^3 \sqrt{x+y} \ – \ 1}{1 \ – \ 8y^3 \sqrt{x+y}}$$

\(\mathbf{5. \ \ e^{x^2y}=x+y} \)

$$e^{x^2y}=x+y$$ $$\frac{d}{dx} \Big[ e^{x^2y} \Big] = \frac{d}{dx} \big[ x+y \big]$$ $$e^{x^2y} \bigg( 2xy + x^2 \frac{dy}{dx} \bigg) = 1 + \frac{dy}{dx}$$ $$2xye^{x^2y} + x^2e^{x^2y} \frac{dy}{dx} = 1+ \frac{dy}{dx}$$ $$x^2e^{x^2y} \frac{dy}{dx} \ – \ \frac{dy}{dx} = 1 \ – \ 2xye^{x^2y}$$ $$\frac{dy}{dx} \big(x^2e^{x^2y} \ – \ 1 \big) = 1 \ – \ 2xye^{x^2y}$$ $$\frac{dy}{dx} = \frac{1 \ – \ 2xye^{x^2y}}{x^2e^{x^2y} \ – \ 1}$$