# Nakafa Learning Content

> For AI agents: use [llms.txt](https://nakafa.com/llms.txt) for the site index. Markdown versions are available by appending `.md` to content URLs or sending `Accept: text/markdown`.

URL: https://nakafa.com/en/subjects/mathematics/integral/integral-in-physics
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/material/lesson/mathematics/integral/integral-in-physics/en.mdx

Explore how integrals solve physics problems: calculate work with variable forces, spring energy, mass distributions, and center of mass.

---

## The Role of Integrals in the World of Physics

Have you ever wondered how physicists calculate the energy needed to launch a rocket into space? Or how they determine the forces acting on a water dam? One method they use is **integrals**.

In physics, many quantities we need cannot be calculated with simple formulas because they involve continuous changes. For example, the force acting on an object might change with position or time. This is where integrals become useful.

The basic concept of integrals in physics is **accumulation**. If we have the rate of change of a quantity, integrals help us find the total quantity over a specific interval.

## Calculating Work with Integrals

Let's start with the most fundamental concept: **work**. In physics, work is defined as the product of force and displacement. But what if the force varies along the path?

Imagine a particle located at position $$x \text{ meters}$$ from the origin. The force acting on the particle is $$F(x) = x^2 + 2x$$ Newtons. Now, what is the work required to move the particle from position $$x = 1 \text{ meter}$$ to position $$x = 3 \text{ meters}$$?

Visible text: Imagine a particle located at position from the origin. The force acting on the particle is Newtons. Now, what is the work required to move the particle from position to position ?

Well, since the force changes with position, we cannot use the simple formula $$W = F \times s$$. We need to use integrals:

Visible text: Well, since the force changes with position, we cannot use the simple formula . We need to use integrals:

```math
W = \int_{1}^{3} F(x) \, dx = \int_{1}^{3} (x^2 + 2x) \, dx
```

Let's solve it:

Component: MathContainer
Children:

```math
W = \left[\frac{x^3}{3} + x^2\right]_{1}^{3}
```

```math
W = \left(\frac{27}{3} + 9\right) - \left(\frac{1}{3} + 1\right)
```

```math
W = (9 + 9) - \left(\frac{1}{3} + \frac{3}{3}\right) = 18 - \frac{4}{3}
```

```math
W = \frac{54}{3} - \frac{4}{3} = \frac{50}{3} \text{ Joule}
```

So, the required work is $$\frac{50}{3}$$ or approximately $$16.67$$ Joules.

Visible text: So, the required work is or approximately Joules.

## Hooke's Law and Spring Energy

Now we use integrals in **Hooke's Law**. Have you ever played on a trampoline or pressed a spring? The further we compress a spring, the greater the force required. This is what Hooke's Law explains.

According to Hooke's Law, the force required to stretch or compress a spring is proportional to its displacement from the equilibrium position:

```math
F(x) = kx
```

where $$k$$ is the spring constant and $$x$$ is the displacement distance from the natural position.

Visible text: where is the spring constant and is the displacement distance from the natural position.

Let's look at a real example. Suppose a force of $$40 \text{ N}$$ is required to hold a spring that has been stretched from its original length of $$10 \text{ cm}$$ to $$15 \text{ cm}$$. Now, what is the work required to stretch the spring from $$15 \text{ cm}$$ to $$18 \text{ cm}$$?

Visible text: Let's look at a real example. Suppose a force of is required to hold a spring that has been stretched from its original length of to . Now, what is the work required to stretch the spring from to ?

First, we determine the spring constant. The displacement from the natural position is $$15 - 10 = 5 \text{ cm} = 0.05 \text{ m}$$. Since $$F = kx$$, then:

Visible text: First, we determine the spring constant. The displacement from the natural position is . Since , then:

```math
40 = k \times 0.05
```

So $$k = \frac{40}{0.05} = 800 \text{ N/m}$$.

Visible text: So .

Now, to calculate the work to stretch the spring from $$15 \text{ cm}$$ to $$18 \text{ cm}$$, we need to calculate the integral. The coordinates we use:

Visible text: Now, to calculate the work to stretch the spring from to , we need to calculate the integral. The coordinates we use:

- Position $$15 \text{ cm} = 0.05 \text{ m}$$ from natural position
- Position $$18 \text{ cm} = 0.08 \text{ m}$$ from natural position

Visible text: - Position from natural position
- Position from natural position

We can calculate the work with integrals:

Component: MathContainer
Children:

```math
W = \int_{0.05}^{0.08} 800x \, dx
```

```math
W = 800 \left[\frac{x^2}{2}\right]_{0.05}^{0.08}
```

```math
W = 400[(0.08)^2 - (0.05)^2]
```

```math
W = 400[0.0064 - 0.0025] = 400 \times 0.0039 = 1.56 \text{ Joule}
```

## Calculating Mass from Density Functions

Another application of integrals in physics is calculating the **mass** of an object if we know its density function. This is very useful for objects with non-uniform density.

Suppose we have a rod of length $$2 \text{ meters}$$ with linear density $$\rho(x) = 3x + 2 \text{ kg/m}$$, where $$x$$ is the distance from one end of the rod. What is the total mass of the rod?

Visible text: Suppose we have a rod of length with linear density , where is the distance from one end of the rod. What is the total mass of the rod?

Component: MathContainer
Children:

```math
m = \int_{0}^{2} \rho(x) \, dx = \int_{0}^{2} (3x + 2) \, dx
```

```math
m = \left[\frac{3x^2}{2} + 2x\right]_{0}^{2}
```

```math
m = \frac{3(4)}{2} + 2(2) = 6 + 4 = 10 \text{ kg}
```

## Determining Center of Mass

Another very important concept is **center of mass**. For objects with non-uniform density, the center of mass can be calculated using integrals.

If we have a rod with density $$\rho(x)$$ over interval $$[a, b]$$, then the center of mass coordinate is:

Visible text: If we have a rod with density over interval , then the center of mass coordinate is:

```math
\bar{x} = \frac{\int_{a}^{b} x \rho(x) \, dx}{\int_{a}^{b} \rho(x) \, dx}
```

For the rod with density $$\rho(x) = 3x + 2$$ above:

Visible text: For the rod with density above:

Component: MathContainer
Children:

```math
\bar{x} = \frac{\int_{0}^{2} x(3x + 2) \, dx}{10}
```

```math
\bar{x} = \frac{\int_{0}^{2} (3x^2 + 2x) \, dx}{10}
```

```math
\bar{x} = \frac{[x^3 + x^2]_{0}^{2}}{10} = \frac{8 + 4}{10} = 1.2 \text{ meter}
```

> The center of mass indicates the point where the entire mass of an object can be considered concentrated. This is very important in equilibrium analysis and object dynamics.

## Calculating Moment of Inertia

**Moment of inertia** is a quantity that shows how difficult it is for an object to rotate about a certain axis. For continuous objects, moment of inertia is calculated using integrals:

```math
I = \int r^2 \, dm
```

where $$r$$ is the distance from the rotation axis and $$dm$$ is the mass element.

Visible text: where is the distance from the rotation axis and is the mass element.

For a homogeneous rod with mass $$M$$ and length $$L$$ rotating about one of its ends:

Visible text: For a homogeneous rod with mass and length rotating about one of its ends:

```math
I = \int_{0}^{L} x^2 \frac{M}{L} \, dx = \frac{M}{L} \int_{0}^{L} x^2 \, dx = \frac{M}{L} \left[\frac{x^3}{3}\right]_{0}^{L} = \frac{ML^2}{3}
```

## Exercises

1. A particle moves along the $$x$$-axis with force $$F(x) = 4x - x^2$$ Newtons. Calculate the work done to move the particle from $$x = 0$$ to $$x = 3 \text{ meters}$$!

2. A spring has spring constant $$k = 200 \text{ N/m}$$. How much energy is stored in the spring when stretched $$0.1 \text{ meters}$$ from equilibrium position?

3. A wire of length $$4 \text{ meters}$$ has linear density $$\rho(x) = 2 + x \text{ kg/m}$$. Determine the total mass of the wire and the position of its center of mass!

Visible text: 1. A particle moves along the -axis with force Newtons. Calculate the work done to move the particle from to !

2. A spring has spring constant . How much energy is stored in the spring when stretched from equilibrium position?

3. A wire of length has linear density . Determine the total mass of the wire and the position of its center of mass!

### Answer Key

1. **Calculating work with variable force**

   <MathContainer>
   
   
   ```math
   W = \int_{0}^{3} (4x - x^2) \, dx
   ```

   
   
   ```math
   W = \left[2x^2 - \frac{x^3}{3}\right]_{0}^{3}
   ```

   
   
   ```math
   W = \left(2(3)^2 - \frac{(3)^3}{3}\right) - \left(2(0)^2 - \frac{(0)^3}{3}\right)
   ```

   
   
   ```math
   W = \left(18 - 9\right) - 0 = 9 \text{ Joule}
   ```

   </MathContainer>

   The work done is $$9$$ Joules.

2. **Calculating spring energy**

   The potential energy stored in the spring is:

   <MathContainer>
   
   
   ```math
   E = \int_{0}^{0.1} kx \, dx = \int_{0}^{0.1} 200x \, dx
   ```

   
   
   ```math
   E = 200 \left[\frac{x^2}{2}\right]_{0}^{0.1}
   ```

   
   
   ```math
   E = 200 \times \frac{(0.1)^2 - 0^2}{2} = 200 \times \frac{0.01}{2} = 100 \times 0.01 = 1 \text{ Joule}
   ```

   </MathContainer>

   The potential energy stored is $$1$$ Joule.

3. **Calculating wire mass and center of mass**

   Total mass:

   
   
   ```math
   m = \int_{0}^{4} (2 + x) \, dx = \left[2x + \frac{x^2}{2}\right]_{0}^{4} = 8 + 8 = 16 \text{ kg}
   ```

   Center of mass:

   <MathContainer>
   
   
   ```math
   \bar{x} = \frac{\int_{0}^{4} x(2 + x) \, dx}{16}
   ```

   
   
   ```math
   \bar{x} = \frac{\int_{0}^{4} (2x + x^2) \, dx}{16}
   ```

   
   
   ```math
   \bar{x} = \frac{[x^2 + \frac{x^3}{3}]_{0}^{4}}{16} = \frac{16 + \frac{64}{3}}{16}
   ```

   
   
   ```math
   \bar{x} = \frac{\frac{48 + 64}{3}}{16} = \frac{\frac{112}{3}}{16} = \frac{112}{48} = \frac{7}{3} \text{ meter}
   ```

   </MathContainer>

   The total mass of the wire is $$16 \text{ kg}$$ and its center of mass is located at position $$\frac{7}{3} \text{ meters}$$ from the end.

Visible text: 1. **Calculating work with variable force**

 <MathContainer>
 
 

 
 

 
 

 
 

 </MathContainer>

 The work done is Joules.

2. **Calculating spring energy**

 The potential energy stored in the spring is:

 <MathContainer>
 
 

 
 

 
 

 </MathContainer>

 The potential energy stored is Joule.

3. **Calculating wire mass and center of mass**

 Total mass:

 
 

 Center of mass:

 <MathContainer>
 
 

 
 

 
 

 
 

 </MathContainer>

 The total mass of the wire is and its center of mass is located at position from the end.