Blogs, Calculus, Study Help

A New Garden

I recently decided that I wanted to start a garden in my back yard. While I don’t have a huge back yard, I should have enough room to make a small garden and grow a few plants. When I looked in my shed I found 24 feet of usable fencing that I can use to enclose my garden. Furthermore, I already have a fence around my back yard, so I will use that fence for one of the sides of the rectangular garden I plan to make. Before digging up the grass and tilling the soil, I want to know what dimensions I should make the garden to ensure that I have the largest area available for planting.


As I looked at this, I realized that I had an applied optimization problem that I needed to solve. Similar to the related rates questions I ran across while fishing, I am going to work through a process that will eventually give me the solution I am looking for. In this case, I have many of the same steps, but a few will be different since it is a different type of applied problem. Here my process will be

  1. Read the problem!
    It is important to know exactly what is given and what I am trying to find before proceeding, often I will draw a picture to keep track of this information.
  2. Assign any variables.
    In this case I will assign variables to anything that I have control over in the planning process, or anything that I want to optimize.
  3. Find an equation.
    I want to find an equation representing the goal of the problem. That is an equation that I want to optimize.
  4. Simplify the equation and find the domain.
    In many cases the objective function I came up with will involve multiple variables. I have to rewrite the equation in terms of one variable. Then, I have to find the values of this variable that make sense in the context of the problem.
  5. Differentiate and find critical points.
  6. Determine if the absolute extrema exist and what they are.
  7. Use this to find the solution to the original problem.

Whenever I am working through optimization problems, I will use this outline as a guide. Often the most difficult part, as was the case with related rates, is finding the equation to use. Each example I run into is different, so it does take some creative problem solving to find this equation.

Read the problem

In this case, I will note that the first two sentences of my problem don’t give me anything useful for my model, rather they set they tell me about the particular problem I am looking at. Then, I note that

  • I have 24 feet of fencing.
  • One side of the garden does not need fencing.
  • My garden will be a rectangle.
  • I want to maximize area.

Assign Variables

In this case, I must have a rectangular garden, so I have control over the length and width of the garden. Instead of assigning length and width as \(l\) and \(w\), I want to keep track of what different about them. In particular, one side is parallel to the existing fence and the other two sides are perpendicular to it. I will, therefore, call the parallel side \(a\) and the perpendicular side \(e\). If you would pick different letters, there is nothing wrong with that, these are just the letters I would choose.

Furthermore, I know that I want to maximize the area. Therefore, I will assign a variable for area. Here I will let \(A=\)area of the garden.

Find Equation

Because we are trying to maximize the area of the garden, we need to find the equation for area. For a rectangle, the area is length times width. Using my variables, I get


Now that I know what I need to maximize, I have to find a way to do so. At the moment, area is a function of two variables. While I may be able to differentiate functions with multiple variables using multivariate calculus, I am still working with Calculus 1 material. Therefore, I want to be able to rewrite this equation using one variable. In order to do so, I must find a relation between the two variables.

What I notice here is that amount of fencing is 24 feet. In this case, I have that the fencing makes up two sides of length \(e\) and one side of length \(a\). Therefore,
24&=2e+a \text{, so }\\

Now that we have solved for \(a\) in terms of \(e\), I can substitute this to find that
A&=a*e \\
&=(24-2e)(e) \\

I will also need to determine which \(e\) values make sense. Note that, since \(e\) is a length, we must have \(e \geq 0\). Furthermore, \(a\) is a length, so \(a \geq 0\). Since \(a=24-2e\), this gives us that
24-2e &\geq 0 \\
24& \geq 2e \\
12 & \geq e.
Hence, the domain of the function is \(0 \leq e \leq 12\).

Find critical points

Now that I have my function in one variable and I have my domain, I am ready to find the critical points. I will first find that
\frac{d}{de}A&=\frac{d}{de}(24e-2e^{2}) \\

In order to find the critical points, I have to find where this is \(0\) and undefined. Recall that my function is only defined on the interval \(0 \leq e \leq 12\). Because of this, my derivative is not defined at \(e=0\) and \(e=12\) (recall that the secant can’t be found from one side, so the limit of slopes of secants does not exist).

Now, my derivative is \(0\) is
24-4e&=0 \text{ or } \\
24&=4e \\

Since \(0,6,12\) are all in the domain these are all critical values. Furthermore, I can find the critical points by evaluating \(A\) at these values. We then get \((0,0), (6,72), (12,0)\).

Find Extrema

In this case, I have a function, \(A\), that is continuous on the closed interval \([0,12]\). I, therefore, know that the abolsute maximum and minimum must exist. Furthermore, these extrema must occur at the critical points. Therefore, the largest value at these points is the absolute maximum and the smallest is the absolute minimum. Therefore, the absolute maximum is 72 at 6 and the absolute minimum is 0 at 0 and 12.


I have now solved the model I created, but I still have to answer the original question. What I have found is that the largest \(A\) is 72 when \(e\) is 6. Recall that \(e\) was the side perpendicular to the existing fence. Furthermore, the lengths were given in feet. Hence, the length perpendicular to the fence should be 6 feet.

Before writing out what \(A\) means, I will look at \(a\), that is the side parallel to the existing fence. I saw that \(a=24-2e\), so \(a=24-2*6=12\). Since this was also in feet, I see that the length parallel to the fence will be 12 feet. Now, since \(A=a*e\), its units will be \(ft*ft=ft^{2}\). Also, since \(A\)=area of garden, we get that the area of the garden will be 72 feet\(^{2}\).

If I now combine this together, I get, “In order to make the maximum area for my garden, I should place my fence so that length perpendicular to the existing fence is 6 feet and the length parallel to the existing fence is 12 feet. This will result in a garden with an area of 72 square feet.”


Now, I’m all ready to go out and make my garden. I just have to actually find the energy to dig up the soil and plant things. I’ll get this at some point, but I will leave you with a picture showing where my garden will be.

I hope you enjoyed finding what size I should make my garden and that it helped you with your applied optimization. If you found it helpful please be sure to share it with someone else that may like it and subscribe to our channel on YouTube.

We'd love to hear your thoughts!

This site uses Akismet to reduce spam. Learn how your comment data is processed.