跳到正文

题解

题解:P12037 [USTCPC 2025] 数学分析

lkrqwq约 2 分钟
原文
文章信息与版本

文章信息

发布
2025年4月10日
收录
2025年12月12日
更新
2026年11月15日
篇幅
约 2 分钟
获赞
3
题目
P12037

版本

  1. v1当前

很简单的微积分练手题。

我们令 f(k)f(k) 为 ∫01xk1+x2dx\displaystyle \int_{0}^1 \frac{x^k}{1 + x^2} \mathrm dx,那么原式改写为:

∑i=0naif(i).\sum_{i = 0} ^ n a_if(i).

接下来推导 f(k)f(k):

f(k)=∫01xk1+x2dx=∫01xk−2⋅x21+x2dx=∫01xk−2(1−11+x2)dx=∫01xk−2dx−∫01xk−21+x2dx=1k−1−f(k−2).\begin{aligned} f(k) &= \int_{0}^1 \frac{x^k}{1 + x^2} \mathrm dx \\ &= \int_{0}^1 x^{k - 2}\cdot \frac{x^2}{1 + x^2} \mathrm dx \\ &= \int_{0}^1 x^{k - 2}\left(1 - \frac{1}{1 + x^2}\right) \mathrm dx \\ &= \int_{0}^1 x^{k-2} \mathrm dx - \int_{0}^1 \dfrac{x^{k-2}}{1 + x^2} \mathrm dx \\ &= \dfrac{1}{k - 1} - f(k - 2). \end{aligned}

接下来求解 f(1)f(1):

∫1x2+1dx=arctan⁡(x)+C.\begin{aligned} \int \dfrac{1}{x^2+1} \mathrm dx &= \arctan(x) + C. \end{aligned}

代入原式得 f(1)=arctan⁡(1)f(1) = \arctan(1)。

继续求解 f(2)f(2):

∫x1+x2dx=∫12udu(u=x2+1)=ln⁡(u)2+C=ln⁡(x2+1)2+C.\begin{aligned} \int \dfrac{x}{1 + x^2} \mathrm dx &= \int \dfrac{1}{2u}\mathrm du (u = x^2+1) \\ &= \dfrac{\ln (u)}{2} + C \\ &= \dfrac{\ln (x^2 + 1)}{2} + C. \end{aligned}

代入原式得 f(2)=ln⁡(2)2f(2) = \dfrac{\ln(2)}{2}.

接下来我们只需递推就做完了,时间复杂度 O(n)O(n)。

原文
存档评论2 条抓取于