You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
python/数学课程/【二次函数】二次函数与线段交点个数问题.md

37 lines
1.2 KiB

![](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$