You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何绘制未知积分函数F(x)=∫₀ˣ te^(-1/t²)dt的图像

Plotting ( F(x) = \int_0^x t e{-1/t2} dt )

Hey there! Let's tackle plotting this integral function. I'll walk you through both code-based (the easiest way for non-elementary integrals) and manual sketching approaches so you can pick what works best for you.

First, Quick Function Context

Before diving into plotting, let's nail down a few key properties of ( F(x) ):

  • At ( t=0 ), the integrand ( t e{-1/t2} ) has a limit of 0 (the exponential term decays way faster than ( t ) approaches 0), so ( F(x) ) is defined for all real numbers.
  • By the Fundamental Theorem of Calculus, ( F'(x) = x e{-1/x2} ) for ( x \neq 0 ), and ( F'(0) = 0 ). This means:
    • ( F(x) ) strictly increases when ( x > 0 )
    • ( F(x) ) strictly decreases when ( x < 0 )
  • As ( x \to +\infty ), ( F(x) ) grows roughly like ( \frac{1}{2}x^2 ) (the integrand approximates ( t ) for large ( t )), so it heads to ( +\infty ). For ( x \to -\infty ), it tends to ( -\infty ).
  • ( F(0) = 0 ), since the integral from 0 to 0 is always zero.

Method 1: Python (SciPy + Matplotlib) - The Most Practical Approach

Since this integral doesn't have an elementary antiderivative, numerical integration is the way to go. Here's a ready-to-run code example:

import numpy as np
import matplotlib.pyplot as plt
from scipy.integrate import quad

# Define the integrand, handling t=0 to avoid division by zero
def integrand(t):
    if t == 0:
        return 0.0
    return t * np.exp(-1 / t**2)

# Define F(x): compute the definite integral from 0 to x
def F(x):
    # quad returns (integral result, error estimate) - we only need the result
    result, _ = quad(integrand, 0, x)
    return result

# Generate a dense range of x values for a smooth curve
x_values = np.linspace(-2, 2, 1000)
# Calculate F(x) for each x in our range
f_values = np.array([F(x) for x in x_values])

# Plot the function
plt.figure(figsize=(8, 5))
plt.plot(x_values, f_values, label=r'$F(x) = \int_0^x t e^{-1/t^2} dt$', color='royalblue')
plt.xlabel('x')
plt.ylabel('F(x)')
plt.title('Plot of the Integral Function F(x)')
plt.legend()
plt.grid(True, alpha=0.3)
plt.show()

Quick Code Notes:

  • The quad function from SciPy handles numerical integration reliably, even near tricky points like ( t=0 ).
  • We explicitly handle ( t=0 ) in the integrand to avoid a division-by-zero error when calculating ( 1/t^2 ).
  • Using 1000 points in linspace ensures the curve looks smooth instead of jagged.

Method 2: Manual Sketching (No Code Needed)

If you don't have access to programming tools, you can sketch the curve using the properties we analyzed:

  • Start at the origin ( (0, 0) ), since ( F(0) = 0 ).
  • For ( x > 0 ):
    • The curve rises from the origin, speeding up as ( x ) grows (since ( F'(x) ) increases with ( x )).
    • It's concave down (curving inward) when ( 0 < x < \sqrt{2} \approx 1.414 ), and concave up (curving outward) when ( x > \sqrt{2} ) (found by analyzing the second derivative ( F''(x) )).
  • For ( x < 0 ):
    • The curve falls from the origin, slowing down? Wait no—actually, it decreases faster as ( x ) becomes more negative.
    • It's concave down when ( -\sqrt{2} < x < 0 ), and concave up when ( x < -\sqrt{2} ).
  • Mark the inflection points at ( (\sqrt{2}, F(\sqrt{2})) ) and ( (-\sqrt{2}, F(-\sqrt{2})) ) — you can approximate ( F(\sqrt{2}) ) with a calculator that does numerical integration if needed.

内容的提问来源于stack exchange,提问作者gefavasej

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 07:25:34