Responsive Navbar with Google Search
Introduction to Scipy: Integration
Python runs in your browser. Heavy or infinite loops may freeze your browser tab. Use "Stop" if needed; for heavy jobs, run locally.
Program 1

Integration

Single Definite Integral

Integrating a simple function \( f(x) = x^2 \) over the interval [0, 1]:

\[ \int_0^1 x^2 \, dx \]

Output 1
Program 2

Integration

Indefinite Integral Example

Let the function be defined as:

\[ f(x) = e^{-x^2} \]

The indefinite integration of this function over the range \( [0, \infty] \) is:

\[ \int_0^{\infty} e^{-x^2} \, dx \]

This integral has a known solution, which is \( \frac{\sqrt{\pi}}{2} \).

Output 2
Program 3

Integration

Double Integral

Integrating a function \( f(x, y) = x \cdot y \) over the region \([0, 1]\) for both \( x \) and \( y \), we have:

\[ \int_0^1 \int_0^1 x \cdot y \, dx \, dy \]

In this case, the result of the double integral is:

\[ \left( \int_0^1 x \, dx \right) \cdot \left( \int_0^1 y \, dy \right) = \frac{1}{2} \cdot \frac{1}{2} = \frac{1}{4} \]

Output 3
Program 4

Integration

Triple Integral

Triple integration of the function \( f(x, y, z) = x \cdot y \cdot z \) over the range \([0, 1]\) for all three variables is expressed as:

\[ \int_0^1 \int_0^1 \int_0^1 x \cdot y \cdot z \, dx \, dy \, dz \]

To solve this triple integral, we first evaluate the integrals for each variable:

\[ \left( \int_0^1 x \, dx \right) \cdot \left( \int_0^1 y \, dy \right) \cdot \left( \int_0^1 z \, dz \right) = \frac{1}{8} \]

Output 4
Program 5

Integration

Double Integral with Custom Range

Let the function be defined as:

\[ f(x, y) = \sin(x) \cdot \cos(y) \]

We can perform double integration of this function over the range:

\[ \int_0^{\pi} \int_0^{\frac{\pi}{2}} \sin(x) \cdot \cos(y) \, dy \, dx \]

Output 5
Program 6

Integration

Double Integral Example

Let the function be defined as:

\[ f(x, y) = x^2 y + xy^2 \]

We can perform double integration of this function over the following ranges:

  • For \( x \) from 0 to 1
  • For \( y \) from 0 to 2 (with the bounds depending on \( x \))

The double integral can be expressed as:

\[ \int_0^1 \int_0^2 (x^2 y + xy^2) \, dy \, dx \]

Output 6