Files
python/数学课程/【二次函数】二次函数与线段交点个数问题.md
HuangHai 1f397eca87 'commit'
2025-08-30 18:35:01 +08:00

37 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

![](http://dsideal.obs.cn-north-1.myhuaweicloud.com/HuangHai/BlogImages/2023/03/596878dbde466c98175c90639617d7fa.png)
#### 第一步:先求与直线相交交点的范围
$$
\left\{\begin{matrix}
y=\frac{1}{2}x+\frac{1}{2} & \\
y=ax^2-x+1 &
\end{matrix}\right.
$$
即$\frac{1}{2}x+\frac{1}{2}=ax^2-x+1$
$ax^2-\frac{3}{2}x+\frac{1}{2}=0$
$\because 有两个交点$
$\therefore \triangle>0$
即$\frac{9}{4}-2a>0$
$\therefore a<\frac{9}{8}$
#### 第二步:与线段$AB$交点范围
- $a>0$
开口向上,模拟画出一个与线段$AB$有两个交点的抛物线,发现此抛物线当$x_1=-1,x_2=1$时,对应的$y_1,y_2$肯定是大于直线方程上的$0,1$
即 $$
\large \left\{\begin{matrix}
a+1+1>=0& \\
a-1+1>=1&
\end{matrix}\right.
$$
解得$\frac{9}{8}>a>=1$
- $a<0$
开口向下,模拟画出一个与线段$AB$有两个交点的抛物线,发现此抛物线当$x_1=-1,x_2=1$时,对应的$y_1,y_2$肯定是小于直线方程上的$0,1$
即 $$
\large \left\{\begin{matrix}
a+1+1<=0& \\
a-1+1<=1&
\end{matrix}\right.
$$
解得$a<=-2$
所以答案是两部分$\frac{9}{8}>a>=1$或$a<=-2$