Python Encyclopedia for Academics
  • Course Outline
  • Artificial Intelligence
    • Data Science Foundation
      • Python Programming
        • Introduction and Basics
          • Variables
          • Print Function
          • Input From User
          • Data Types
          • Type Conversion
        • Operators
          • Arithmetic Operators
          • Relational Operators
          • Bitwise Operators
          • Logical Operators
          • Assignment Operators
          • Compound Operators
          • Membership Operators
          • Identity Operators
      • Numpy
        • Vectors, Matrix
        • Operations on Matrix
        • Mean, Variance, and Standard Deviation
        • Reshaping Arrays
        • Transpose and Determinant of Matrix
      • Pandas
        • Series and DataFrames
        • Slicing, Rows, and Columns
        • Operations on DataFrames
        • Different wayes to creat DataFrame
        • Read, Write Operations with CSV files
      • Matplotlib
        • Graph Basics
        • Format Strings in Plots
        • Label Parameters, Legend
        • Bar Chart, Pie Chart, Histogram, and Scatter Plot
  • Machine Learning Algorithms
    • Regression Analysis In ML
      • Regression Analysis in Machine Learning
      • Proof of Linear Regression Formulas
      • Simple Linear Regression Implementation
      • Multiple Linear Regression
      • Advertising Dataset Example
      • Bike Sharing Dataset
      • Wine Quality Dataset
      • Auto MPG Dataset
    • Classification Algorithms in ML
      • Proof of Logistic Regression
      • Simplified Mathematical Proof of SVM
      • Iris Dataset
  • Machine Learning Laboratory
    • Lab 1: Titanic Dataset
      • Predicting Survival on the Titanic with Machine Learning
    • Lab 2: Dow Jones Index Dataset
      • Dow Jones Index Predictions Using Machine Learning
    • Lab 3: Diabetes Dataset
      • Numpy
      • Pandas
      • Matplotlib
      • Simple Linear Regression
      • Simple Non-linear Regression
      • Performance Matrix
      • Preprocessing
      • Naive Bayes Classification
      • K-Nearest Neighbors (KNN) Classification
      • Decision Tree & Random Forest
      • SVM Classifier
      • Logistic Regression
      • Artificial Neural Network
      • K means Clustering
    • Lab 4: MAGIC Gamma Telescope Dataset
      • Classification in ML-MAGIC Gamma Telescope Dataset
    • Lab 5: Seoul Bike Sharing Demand Dataset
      • Regression in ML-Seoul Bike Sharing Demand Dataset
    • Lab 6: Medical Cost Personal Datasets
      • Predict Insurance Costs with Linear Regression in Python
    • Lab 6: Predict The S&P 500 Index With Machine Learning And Python
      • Predict The S&P 500 Index With Machine Learning And Python
  • Artificial Neural Networks
    • Biological Inspiration vs. Artificial Neurons
    • Review linear algebra and calculus essentials for ANNs
    • Activation Function
  • Mathematics
    • Pre-Calculus
      • Factorials
      • Roots of Polynomials
      • Complex Numbers
      • Polar Coordinates
      • Graph of a Function
    • Calculus 1
      • Limit of a Function
      • Derivative of Function
      • Critical Points
      • Indefinite Integrals
  • Calculus 2
    • 3D Coordinates and Vectors
    • Vectors and Vector Operations
    • Lines and Planes in Space (3D)
    • Partial Derivatives
    • Optimization Problems (Maxima/Minima) in Multivariable Functions
    • Gradient Vectors
  • Engineering Mathematics
    • Laplace Transform
  • Electrical & electronics Eng
    • Resistor
      • Series Resistors
      • Parallel Resistors
    • Nodal Analysis
      • Example 1
      • Example 2
    • Transient State
      • RC Circuit Equations in the s-Domain
      • RL Circuit Equations in the s-Domain
      • LC Circuit Equations in the s-Domain
      • Series RLC Circuit with DC Source
  • Computer Networking
    • Fundamental
      • IPv4 Addressing
      • Network Diagnostics
  • Cybersecurity
    • Classical Ciphers
      • Caesar Cipher
      • Affine Cipher
      • Atbash Cipher
      • Vigenère Cipher
      • Gronsfeld Cipher
      • Alberti Cipher
      • Hill Cipher
Powered by GitBook
On this page
  • Example 1:
  • Example 2:
  • Example 3:
  • Example 4:
  • Example 5:
  • Example 6:
  1. Mathematics
  2. Calculus 1

Indefinite Integrals

Nerd Cafe

Example 1:

∫x2dx\int_{}^{}x^{2}dx∫​x2dx
  • Math Solution:

∫x2dx=x33+C\int_{}^{}x^{2}dx=\frac{x^{3}}{3}+C∫​x2dx=3x3​+C
  • Python Code:

from sympy import symbols, integrate

x = symbols('x')
integrate(x**2, x)

Example 2:

∫(3x2+2x+1)dx\int_{}^{}\left( 3x^{2}+2x+1 \right)dx∫​(3x2+2x+1)dx
  • Math Solution:

∫(3x2+2x+1)dx=x3+x2+x+C\int_{}^{}\left( 3x^{2}+2x+1 \right)dx=x^{3}+x^{2}+x+C∫​(3x2+2x+1)dx=x3+x2+x+C
  • Python Code:

from sympy import symbols, integrate

x = symbols('x')
integrate(3*x**2 + 2*x + 1, x)

Example 3:

∫sin(x)dx\int_{}^{}sin\left( x \right)dx∫​sin(x)dx
  • Math Solution:

∫sin(x)dx=−cos(x)+C\int_{}^{}sin\left( x \right)dx=-cos\left( x \right)+C∫​sin(x)dx=−cos(x)+C
  • Python Code:

from sympy import symbols, integrate, sin

x = symbols('x')
integrate(sin(x), x)

Example 4:

∫cos(x)dx\int_{}^{}cos\left( x \right)dx∫​cos(x)dx
  • Math Solution:

∫cos(x)dx=sin(x)+C\int_{}^{}cos\left( x \right)dx=sin\left( x \right)+C∫​cos(x)dx=sin(x)+C
  • Python Code:

from sympy import symbols, integrate, cos

x = symbols('x')
integrate(cos(x), x)

Example 5:

∫exdx\int_{}^{}e^{x}dx∫​exdx
  • Math Solution:

∫exdx=ex+C\int_{}^{}e^{x}dx=e^{x}+C∫​exdx=ex+C
  • Python Code:

from sympy import symbols, integrate, exp

x = symbols('x')
integrate(exp(x), x)

Example 6:

∫1xdx\int_{}^{}\frac{1}{x}dx∫​x1​dx
  • Math Solution:

∫1xdx=ln∣x∣+C\int_{}^{}\frac{1}{x}dx=ln\left| x \right|+C∫​x1​dx=ln∣x∣+C
  • Python Code:

from sympy import symbols, integrate

x = symbols('x')
integrate(1/x, x)

PreviousCritical PointsNextCalculus 2

Last updated 2 months ago