Gemini vs DeepSeek for Math

Gemini pulls ahead on general mathematical reasoning with a 94% GPQA Diamond score versus DeepSeek's 82.4%, but DeepSeek's 93.1% AIME 2025 score shows it punches well above its weight for competition-level math. For broad, reliable math capabilities and integrated tools, Gemini wins—but for cost-conscious users tackling hard problem-solving, DeepSeek R1's reasoning mode offers surprising value.

Head-to-Head for Math

Competitive Math Problem-Solving

DeepSeek

Gemini

Strong reasoning, score not published

DeepSeek

93.1% on AIME 2025 benchmark

Complex Logical Reasoning

Gemini

Gemini

94% on GPQA Diamond test

DeepSeek

82.4% on GPQA Diamond test

Specialized Reasoning Mode

Tie

Gemini

Extended thinking capability

DeepSeek

Math-focused R1 reasoning

Computational Math with Code

Gemini

Gemini

Built-in code execution sandbox

DeepSeek

No native code execution

Cost for Heavy API Usage

DeepSeek

Gemini

$2/$12 per 1M tokens

DeepSeek

$0.56/$1.68 significantly cheaper

See Them Answer a Math Question

We asked both models the same math-focused prompt.

Solve this satisfying satisfying integral: ∫₀^∞ sin(x)/x dx, showing your complete reasoning and any techniques or theorems used.

Gemini 3.1 Pro

Solve this satisfying satisfying integral: ∫₀^∞ sin(x)/x dx, showing your complete reasoning and any techniques or theorems used.

The integral you are asking to solve is known as the Dirichlet Integral. It is a famous and deeply satisfying problem in calculus:

0sin(x)xdx=π2\int_{0}^{\infty} \frac{\sin(x)}{x} \, dx = \frac{\pi}{2}

Because the antiderivative of $\frac{\sin(x)}{x}$ (the sinc function) cannot be expressed in terms of elementary functions, we cannot solve this using the standard Fundamental Theorem of Calculus. Instead, we can use a beautiful technique popularized by physicist Richard Feynman, known as Differentiation Under the Integral Sign (or Feynman's Trick).

Here is the complete step-by-step reasoning.

Step 1: Introduce a Parameter

We define a new function $I(t)$ by introducing a damping factor, $e^{-tx}$, into the integral, where $t \ge 0$:

I(t)=0sin(x)xetxdxI(t) = \int_{0}^{\infty} \frac{\sin(x)}{x} e^{-tx} \, dx

Notice that our original integral is simply $I(0)$. We have transformed the problem into finding the value of this function when the parameter $t = 0$.

Step 2: Differentiate Under the Integral Sign

We take the derivative of $I(t)$ with respect to $t$. Thanks to Leibniz's Rule, we can move the derivative inside the integral sign. Since the integral is with respect to $x$, we treat $x$ as a constant while differentiating with respect to $t$:

I(t)=ddt0sin(x)xetxdxI'(t) = \frac{d}{dt} \int_{0}^{\infty} \frac{\sin(x)}{x} e^{-tx} \, dx I(t)=0t(sin(x)xetx)dxI'(t) = \int_{0}^{\infty} \frac{\partial}{\partial t} \left( \frac{\sin(x)}{x} e^{-tx} \right) \, dx

The derivative of $e^{-tx}$ with respect to $t$ is $-x e^{-tx}$. Notice how the $-x$ beautifully cancels out the problematic $x$ in the denominator:

I(t)=0sin(x)x(xetx)dxI'(t) = \int_{0}^{\infty} \frac{\sin(x)}{x} (-x e^{-tx}) \, dx I(t)=0sin(x)etxdxI'(t) = -\int_{0}^{\infty} \sin(x) e^{-tx} \, dx

Step 3: Evaluate the New Integral

We now have a standard integral that can be solved using Integration by Parts (twice) or by using Euler's formula. Solving $\int e^{-tx} \sin(x) , dx$ yields:

etxsin(x)dx=etx(tsin(x)+cos(x))t2+1\int e^{-tx} \sin(x) \, dx = \frac{-e^{-tx}(t \sin(x) + \cos(x))}{t^2 + 1}

Evaluating this from $0$ to $\infty$:

  1. As $x \to \infty$, the term $e^{-tx}$ goes to $0$ (since $t > 0$), making the whole expression $0$.
  2. At $x = 0$, $\sin(0) = 0$ and $\cos(0) = 1$, so the expression evaluates to $\frac{-1(0 + 1)}{t^2 + 1} = -\frac{1}{t^2 + 1}$.

Subtracting the lower bound from the upper bound:

I(t)=(0(1t2+1))=1t2+1I'(t) = - \left( 0 - \left( -\frac{1}{t^2 + 1} \right) \right) = -\frac{1}{t^2 + 1}

Step 4: Integrate Back to Find $I(t)$

Now that we have $I'(t)$, we integrate it with respect to $t$ to recover $I(t)$:

I(t)=1t2+1dtI(t) = \int -\frac{1}{t^2 + 1} \, dt

This is a standard arctangent integral:

I(t)=arctan(t)+CI(t) = -\arctan(t) + C

Step 5: Solve for the Constant $C$

To find the constant of integration $C$, we look at the behavior of the original parametric function as $t \to \infty$:

limtI(t)=limt0sin(x)xetxdx\lim_{t \to \infty} I(t) = \lim_{t \to \infty} \int_{0}^{\infty} \frac{\sin(x)}{x} e^{-tx} \, dx

As $t$ becomes infinitely large, $e^{-tx}$ approaches $0$ everywhere except at $x=0$, forcing the whole integral to converge to $0$. Therefore:

limtI(t)=0\lim_{t \to \infty} I(t) = 0

Substitute $t \to \infty$ into our arctangent equation:

0=limtarctan(t)+C0 = -\lim_{t \to \infty} \arctan(t) + C

Since we know that $\arctan(\infty) = \frac{\pi}{2}$:

0=π2+C    C=π20 = -\frac{\pi}{2} + C \implies C = \frac{\pi}{2}

Now we have the full formula for our parametric function:

I(t)=π2arctan(t)I(t) = \frac{\pi}{2} - \arctan(t)

Step 6: Find the Original Integral

Recall from Step 1 that our original integral is exactly $I(0)$. We simply plug $t = 0$ into our formula:

I(0)=π2arctan(0)I(0) = \frac{\pi}{2} - \arctan(0)

Since $\arctan(0) = 0$, we arrive at our final answer:

0sin(x)xdx=π2\int_{0}^{\infty} \frac{\sin(x)}{x} \, dx = \frac{\pi}{2}


Alternative Methods

While Feynman's Trick is highly intuitive, the Dirichlet Integral can be solved through other advanced mathematical avenues.

1. The Laplace Transform Method

The function $\frac{\sin(x)}{x}$ is practically begging for a Laplace transform. A known property of the Laplace Transform states:

0f(x)g(x)dx=0(Lf)(s)(L1g)(s)ds\int_{0}^{\infty} f(x) g(x) \, dx = \int_{0}^{\infty} (\mathcal{L}f)(s) (\mathcal{L}^{-1}g)(s) \, ds

If we let $f(x) = \sin(x)$ and $g(x) = \frac{1}{x}$, we get:

  • $\mathcal{L}{\sin(x)}(s) = \frac{1}{s^2 + 1}$
  • $\mathcal{L}^{-1}{\frac{1}{x}}(s) = 1$

Applying this to our integral:

0sin(x)xdx=01s2+11ds\int_{0}^{\infty} \frac{\sin(x)}{x} \, dx = \int_{0}^{\infty} \frac{1}{s^2 + 1} \cdot 1 \, ds

This directly gives us the arctangent integral from $0$ to $\infty$:

[arctan(s)]0=π20=π2\left[ \arctan(s) \right]_{0}^{\infty} = \frac{\pi}{2} - 0 = \frac{\pi}{2}

2. Contour Integration (Complex Analysis)

Using Cauchy's Residue Theorem, we can evaluate this by extending the integral to the complex plane:

sin(x)xdx=Im(eizzdz)\int_{-\infty}^{\infty} \frac{\sin(x)}{x} \, dx = \text{Im} \left( \oint \frac{e^{iz}}{z} \, dz \right)

By drawing a contour along the real axis (with an infinitesimally small semi-circular detour over the singularity at $z=0$) and closing the loop with a giant semicircle in the upper half-plane, applying Jordan's Lemma tells us the outer arc vanishes to zero. Evaluating the residue precisely at the "dent" around $z=0$ ultimately yields $\pi$ for the integral from $-\infty$ to $\infty$. Since $\frac{\sin(x)}{x}$ is an even function, the integral from $0$ to $\infty$ is merely half of it, yielding $\frac{\pi}{2}$.

Try math tasks with both models

See Gemini and DeepSeek answer side by side in Multichat

Try it yourself — free

Detailed Breakdown

When it comes to math, DeepSeek holds a significant advantage over Gemini — and the benchmark data makes this hard to argue with. DeepSeek's AIME 2025 score of 93.1% is one of the strongest results any major model has posted on a rigorous mathematics competition benchmark, while Gemini's AIME score isn't publicly reported at the flagship level. On GPQA Diamond, Gemini scores higher (94% vs 82.4%), but that benchmark spans all of science; on math-specific tasks, DeepSeek's focused reasoning architecture gives it an edge.

DeepSeek's R1 reasoning model deserves special mention here. Designed explicitly for extended, step-by-step problem solving, R1 works through proofs, derivations, and multi-step calculations the way a careful student would — showing its work and catching errors mid-process. This makes it particularly strong for tasks like calculus problems, linear algebra proofs, and competition-style problem sets where intermediate reasoning matters as much as the final answer.

Gemini isn't weak at math by any measure. Its extended thinking mode handles complex problems well, and its code execution capability is a genuine differentiator: Gemini can write and run Python (with NumPy, SymPy, or matplotlib) directly in the interface, letting it verify numerical answers, plot functions, or cross-check symbolic results computationally. For applied math problems — modeling a loan amortization schedule, running a Monte Carlo simulation, or graphing a differential equation — this combination of reasoning and execution is hard to beat.

For students working through coursework, DeepSeek is the stronger choice for pure mathematical reasoning. It handles proof-writing, algebraic manipulation, and contest problems with notable accuracy and explains its logic clearly. Gemini is better suited when math intersects with tools: when you need a graph, want to run a calculation in code, or are working within Google Docs or Sheets on a math-heavy project.

Privacy-conscious users should note that DeepSeek's infrastructure is hosted primarily in China, which may be a consideration for sensitive academic or professional work. Gemini requires a Google account but operates under more familiar Western data policies.

Recommendation: For pure math — problem solving, proofs, tutoring, and competition prep — DeepSeek is the stronger performer, especially with R1 engaged. For applied and computational math where visualization and code execution matter, Gemini's integrated toolset gives it the practical edge. If math is your primary use case and budget matters, DeepSeek's free tier and low API costs make it the clear starting point.

Frequently Asked Questions

Other Topics for Gemini vs DeepSeek

Math Comparisons for Other Models

Try math tasks with Gemini and DeepSeek

Compare in Multichat — free

Join 10,000+ professionals who use Multichat