Skip to main content
HomePython

Course

Introduction to Optimization in Python

IntermediateSkill Level
4.7+
173 reviews
Updated 06/2025
Learn to solve real-world optimization problems using Python's SciPy and PuLP, covering everything from basic to constrained and complex optimization.
Start Course for Free
PythonProgramming4 hr13 videos42 Exercises3,250 XP5,017Statement of Accomplishment

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.

Loved by learners at thousands of companies

Group

Training 2 or more people?

Try DataCamp for Business

Course Description

Optimization problems are ubiquitous in engineering, sciences, and the social sciences. This course will take you from zero optimization knowledge to a hero optimizer. You will use mathematical modeling to translate real-world problems into mathematical ones and solve them in Python using the SciPy and PuLP packages.

Apply Calculus to Unconstrained Optimization Problems with SymPy

You will start by learning the definition of an optimization problem and its use cases. You will use SymPy to apply calculus to yield analytical solutions to unconstrained optimization. You will not have to calculate derivatives or solve equations; SymPy works seamlessly! Similarly, you will use SciPy to get numerical solutions.

Tackle Complex Problems Head-On

Next, you will learn to solve linear programming problems in SciPy and PuLP. To capture real-world complexity, you will see how to apply PuLP and SciPy to solve constrained convex optimization and mixed integer optimization. By the end of this course, you will have solved real-world optimization problems, including manufacturing, profit and budgeting, resource allocation, and more.

Prerequisites

Introduction to NumPy
1

Introduction to Optimization

This chapter introduces optimization, its core components, and its wide applications across industries and domains. It presents a quick, exhaustive search method for solving an optimization problem. It provides a mathematical primer for the concepts required for this course.
Start Chapter
2

Unconstrained and Linear Constrained Optimization

This chapter covers solving unconstrained and constrained optimization problems with differential calculus and SymPy, identifying potential pitfalls. SciPy is also introduced to solve unconstrained optimization problems, in single and multiple dimensions, numerically, with a few lines of code. The chapter goes on to solve linear programming in SciPy and PuLP.
Start Chapter
3

Non-linear Constrained Optimization

4

Robust Optimization Techniques

This chapter covers finding the global optimum when multiple good solutions exist. We will conduct sensitivity analysis and learn linearization techniques that reduce non-linear problems to easily solvable ones with SciPy or PuLP. In terms of applications, we will solve an HR allocation with training costs problem and capital budgeting with dependent projects.
Start Chapter
Introduction to Optimization in Python
Course
Complete

Earn Statement of Accomplishment

Add this credential to your LinkedIn profile, resume, or CV
Share it on social media and in your performance review
Enroll Now

Don’t just take our word for it

*4.7
from 173 reviews
79%
18%
2%
0%
0%
  • Dhruv
    5 days ago

  • Anupama
    5 days ago

  • Balaji Ajay Kumar
    5 days ago

    awesome

  • Kshitij
    5 days ago

  • Sai Hari Krishnan
    5 days ago

  • SUJEETH
    5 days ago

Dhruv

Anupama

"awesome"

Balaji Ajay Kumar

FAQs

Which Python libraries are used for optimization in this course?

You will use SymPy for analytical solutions, SciPy for numerical optimization, and PuLP for linear and mixed integer programming problems.

What types of optimization problems are covered?

The course covers unconstrained optimization, linear programming, constrained convex optimization, and mixed integer linear programming, progressing from simple to complex problems.

What real-world applications are used as examples?

You will solve problems in manufacturing, profit maximization, resource allocation, HR allocation with training costs, and capital budgeting with dependent projects.

Do I need a strong math background for this course?

Basic calculus concepts are helpful, but Chapter 1 includes a mathematical primer covering the foundations needed. You should know intermediate Python and NumPy.

What is sensitivity analysis and is it covered?

Sensitivity analysis examines how changes in problem parameters affect the optimal solution. Chapter 4 covers it alongside linearization techniques for simplifying complex problems.

Join over 19 million learners and start Introduction to Optimization in Python today!

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.

Grow your data skills with DataCamp for Mobile

Make progress on the go with our mobile courses and daily 5-minute coding challenges.