ax2+bx+c=0 (уравнение)
Учитель очень удивится увидев твоё верное решение 😼
Найду корень уравнения: ax2+bx+c=0
Решение
Подробное решение
Это уравнение вида
a*x^2 + b*x + c = 0
Квадратное уравнение можно решить
с помощью дискриминанта.
Корни квадратного уравнения:
$$x_{1} = \frac{\sqrt{D} - b}{2 a}$$
$$x_{2} = \frac{- \sqrt{D} - b}{2 a}$$
где D = b^2 - 4*a*c - это дискриминант.
Т.к.
True
True
True
, то
D = b^2 - 4 * a * c =
(b)^2 - 4 * (a) * (c) = b^2 - 4*a*c
Уравнение имеет два корня.
x1 = (-b + sqrt(D)) / (2*a)
x2 = (-b - sqrt(D)) / (2*a)
или
$$x_{1} = \frac{- b + \sqrt{- 4 a c + b^{2}}}{2 a}$$
$$x_{2} = \frac{- b - \sqrt{- 4 a c + b^{2}}}{2 a}$$ // ________________________________________________________________ \ / ________________________________________________________________ \ \ / ________________________________________________________________ \ / ________________________________________________________________ \
|| / 2 / / 2 2 \\| | / 2 / / 2 2 \\| | | / 2 / / 2 2 \\| | / 2 / / 2 2 \\|
|| 4 / 2 / 2 2 \ |atan2\-4*im(a*c) + 2*im(b)*re(b), re (b) - im (b) - 4*re(a*c)/|| | 4 / 2 / 2 2 \ |atan2\-4*im(a*c) + 2*im(b)*re(b), re (b) - im (b) - 4*re(a*c)/|| | | 4 / 2 / 2 2 \ |atan2\-4*im(a*c) + 2*im(b)*re(b), re (b) - im (b) - 4*re(a*c)/|| | 4 / 2 / 2 2 \ |atan2\-4*im(a*c) + 2*im(b)*re(b), re (b) - im (b) - 4*re(a*c)/||
||-im(b) + \/ (-4*im(a*c) + 2*im(b)*re(b)) + \re (b) - im (b) - 4*re(a*c)/ *sin|--------------------------------------------------------------||*re(a) |-re(b) + \/ (-4*im(a*c) + 2*im(b)*re(b)) + \re (b) - im (b) - 4*re(a*c)/ *cos|--------------------------------------------------------------||*im(a)| |-im(b) + \/ (-4*im(a*c) + 2*im(b)*re(b)) + \re (b) - im (b) - 4*re(a*c)/ *sin|--------------------------------------------------------------||*im(a) |-re(b) + \/ (-4*im(a*c) + 2*im(b)*re(b)) + \re (b) - im (b) - 4*re(a*c)/ *cos|--------------------------------------------------------------||*re(a)
|\ \ 2 // \ \ 2 // | \ \ 2 // \ \ 2 //
x1 = I*|--------------------------------------------------------------------------------------------------------------------------------------------------------- - ---------------------------------------------------------------------------------------------------------------------------------------------------------| + --------------------------------------------------------------------------------------------------------------------------------------------------------- + ---------------------------------------------------------------------------------------------------------------------------------------------------------
| / 2 2 \ / 2 2 \ | / 2 2 \ / 2 2 \
\ 2*\im (a) + re (a)/ 2*\im (a) + re (a)/ / 2*\im (a) + re (a)/ 2*\im (a) + re (a)/
$$x_{1} = \frac{\left(\sqrt[4]{\left(2 \operatorname{re}{\left(b\right)} \operatorname{im}{\left(b\right)} - 4 \operatorname{im}{\left(a c\right)}\right)^{2} + \left(\left(\operatorname{re}{\left(b\right)}\right)^{2} - 4 \operatorname{re}{\left(a c\right)} - \left(\operatorname{im}{\left(b\right)}\right)^{2}\right)^{2}} \sin{\left(\frac{\operatorname{atan_{2}}{\left(2 \operatorname{re}{\left(b\right)} \operatorname{im}{\left(b\right)} - 4 \operatorname{im}{\left(a c\right)},\left(\operatorname{re}{\left(b\right)}\right)^{2} - 4 \operatorname{re}{\left(a c\right)} - \left(\operatorname{im}{\left(b\right)}\right)^{2} \right)}}{2} \right)} - \operatorname{im}{\left(b\right)}\right) \operatorname{im}{\left(a\right)}}{2 \left(\left(\operatorname{re}{\left(a\right)}\right)^{2} + \left(\operatorname{im}{\left(a\right)}\right)^{2}\right)} + \frac{\left(\sqrt[4]{\left(2 \operatorname{re}{\left(b\right)} \operatorname{im}{\left(b\right)} - 4 \operatorname{im}{\left(a c\right)}\right)^{2} + \left(\left(\operatorname{re}{\left(b\right)}\right)^{2} - 4 \operatorname{re}{\left(a c\right)} - \left(\operatorname{im}{\left(b\right)}\right)^{2}\right)^{2}} \cos{\left(\frac{\operatorname{atan_{2}}{\left(2 \operatorname{re}{\left(b\right)} \operatorname{im}{\left(b\right)} - 4 \operatorname{im}{\left(a c\right)},\left(\operatorname{re}{\left(b\right)}\right)^{2} - 4 \operatorname{re}{\left(a c\right)} - \left(\operatorname{im}{\left(b\right)}\right)^{2} \right)}}{2} \right)} - \operatorname{re}{\left(b\right)}\right) \operatorname{re}{\left(a\right)}}{2 \left(\left(\operatorname{re}{\left(a\right)}\right)^{2} + \left(\operatorname{im}{\left(a\right)}\right)^{2}\right)} + i \left(\frac{\left(\sqrt[4]{\left(2 \operatorname{re}{\left(b\right)} \operatorname{im}{\left(b\right)} - 4 \operatorname{im}{\left(a c\right)}\right)^{2} + \left(\left(\operatorname{re}{\left(b\right)}\right)^{2} - 4 \operatorname{re}{\left(a c\right)} - \left(\operatorname{im}{\left(b\right)}\right)^{2}\right)^{2}} \sin{\left(\frac{\operatorname{atan_{2}}{\left(2 \operatorname{re}{\left(b\right)} \operatorname{im}{\left(b\right)} - 4 \operatorname{im}{\left(a c\right)},\left(\operatorname{re}{\left(b\right)}\right)^{2} - 4 \operatorname{re}{\left(a c\right)} - \left(\operatorname{im}{\left(b\right)}\right)^{2} \right)}}{2} \right)} - \operatorname{im}{\left(b\right)}\right) \operatorname{re}{\left(a\right)}}{2 \left(\left(\operatorname{re}{\left(a\right)}\right)^{2} + \left(\operatorname{im}{\left(a\right)}\right)^{2}\right)} - \frac{\left(\sqrt[4]{\left(2 \operatorname{re}{\left(b\right)} \operatorname{im}{\left(b\right)} - 4 \operatorname{im}{\left(a c\right)}\right)^{2} + \left(\left(\operatorname{re}{\left(b\right)}\right)^{2} - 4 \operatorname{re}{\left(a c\right)} - \left(\operatorname{im}{\left(b\right)}\right)^{2}\right)^{2}} \cos{\left(\frac{\operatorname{atan_{2}}{\left(2 \operatorname{re}{\left(b\right)} \operatorname{im}{\left(b\right)} - 4 \operatorname{im}{\left(a c\right)},\left(\operatorname{re}{\left(b\right)}\right)^{2} - 4 \operatorname{re}{\left(a c\right)} - \left(\operatorname{im}{\left(b\right)}\right)^{2} \right)}}{2} \right)} - \operatorname{re}{\left(b\right)}\right) \operatorname{im}{\left(a\right)}}{2 \left(\left(\operatorname{re}{\left(a\right)}\right)^{2} + \left(\operatorname{im}{\left(a\right)}\right)^{2}\right)}\right)$$
// ________________________________________________________________ \ / ________________________________________________________________ \ \ / ________________________________________________________________ \ / ________________________________________________________________ \
|| / 2 / / 2 2 \\ | | / 2 / / 2 2 \\ | | | / 2 / / 2 2 \\ | | / 2 / / 2 2 \\ |
||4 / 2 / 2 2 \ |atan2\-4*im(a*c) + 2*im(b)*re(b), re (b) - im (b) - 4*re(a*c)/| | |4 / 2 / 2 2 \ |atan2\-4*im(a*c) + 2*im(b)*re(b), re (b) - im (b) - 4*re(a*c)/| | | |4 / 2 / 2 2 \ |atan2\-4*im(a*c) + 2*im(b)*re(b), re (b) - im (b) - 4*re(a*c)/| | |4 / 2 / 2 2 \ |atan2\-4*im(a*c) + 2*im(b)*re(b), re (b) - im (b) - 4*re(a*c)/| |
||\/ (-4*im(a*c) + 2*im(b)*re(b)) + \re (b) - im (b) - 4*re(a*c)/ *cos|--------------------------------------------------------------| + re(b)|*im(a) |\/ (-4*im(a*c) + 2*im(b)*re(b)) + \re (b) - im (b) - 4*re(a*c)/ *sin|--------------------------------------------------------------| + im(b)|*re(a)| |\/ (-4*im(a*c) + 2*im(b)*re(b)) + \re (b) - im (b) - 4*re(a*c)/ *cos|--------------------------------------------------------------| + re(b)|*re(a) |\/ (-4*im(a*c) + 2*im(b)*re(b)) + \re (b) - im (b) - 4*re(a*c)/ *sin|--------------------------------------------------------------| + im(b)|*im(a)
|\ \ 2 / / \ \ 2 / / | \ \ 2 / / \ \ 2 / /
x2 = I*|-------------------------------------------------------------------------------------------------------------------------------------------------------- - --------------------------------------------------------------------------------------------------------------------------------------------------------| - -------------------------------------------------------------------------------------------------------------------------------------------------------- - --------------------------------------------------------------------------------------------------------------------------------------------------------
| / 2 2 \ / 2 2 \ | / 2 2 \ / 2 2 \
\ 2*\im (a) + re (a)/ 2*\im (a) + re (a)/ / 2*\im (a) + re (a)/ 2*\im (a) + re (a)/
$$x_{2} = - \frac{\left(\sqrt[4]{\left(2 \operatorname{re}{\left(b\right)} \operatorname{im}{\left(b\right)} - 4 \operatorname{im}{\left(a c\right)}\right)^{2} + \left(\left(\operatorname{re}{\left(b\right)}\right)^{2} - 4 \operatorname{re}{\left(a c\right)} - \left(\operatorname{im}{\left(b\right)}\right)^{2}\right)^{2}} \sin{\left(\frac{\operatorname{atan_{2}}{\left(2 \operatorname{re}{\left(b\right)} \operatorname{im}{\left(b\right)} - 4 \operatorname{im}{\left(a c\right)},\left(\operatorname{re}{\left(b\right)}\right)^{2} - 4 \operatorname{re}{\left(a c\right)} - \left(\operatorname{im}{\left(b\right)}\right)^{2} \right)}}{2} \right)} + \operatorname{im}{\left(b\right)}\right) \operatorname{im}{\left(a\right)}}{2 \left(\left(\operatorname{re}{\left(a\right)}\right)^{2} + \left(\operatorname{im}{\left(a\right)}\right)^{2}\right)} - \frac{\left(\sqrt[4]{\left(2 \operatorname{re}{\left(b\right)} \operatorname{im}{\left(b\right)} - 4 \operatorname{im}{\left(a c\right)}\right)^{2} + \left(\left(\operatorname{re}{\left(b\right)}\right)^{2} - 4 \operatorname{re}{\left(a c\right)} - \left(\operatorname{im}{\left(b\right)}\right)^{2}\right)^{2}} \cos{\left(\frac{\operatorname{atan_{2}}{\left(2 \operatorname{re}{\left(b\right)} \operatorname{im}{\left(b\right)} - 4 \operatorname{im}{\left(a c\right)},\left(\operatorname{re}{\left(b\right)}\right)^{2} - 4 \operatorname{re}{\left(a c\right)} - \left(\operatorname{im}{\left(b\right)}\right)^{2} \right)}}{2} \right)} + \operatorname{re}{\left(b\right)}\right) \operatorname{re}{\left(a\right)}}{2 \left(\left(\operatorname{re}{\left(a\right)}\right)^{2} + \left(\operatorname{im}{\left(a\right)}\right)^{2}\right)} + i \left(- \frac{\left(\sqrt[4]{\left(2 \operatorname{re}{\left(b\right)} \operatorname{im}{\left(b\right)} - 4 \operatorname{im}{\left(a c\right)}\right)^{2} + \left(\left(\operatorname{re}{\left(b\right)}\right)^{2} - 4 \operatorname{re}{\left(a c\right)} - \left(\operatorname{im}{\left(b\right)}\right)^{2}\right)^{2}} \sin{\left(\frac{\operatorname{atan_{2}}{\left(2 \operatorname{re}{\left(b\right)} \operatorname{im}{\left(b\right)} - 4 \operatorname{im}{\left(a c\right)},\left(\operatorname{re}{\left(b\right)}\right)^{2} - 4 \operatorname{re}{\left(a c\right)} - \left(\operatorname{im}{\left(b\right)}\right)^{2} \right)}}{2} \right)} + \operatorname{im}{\left(b\right)}\right) \operatorname{re}{\left(a\right)}}{2 \left(\left(\operatorname{re}{\left(a\right)}\right)^{2} + \left(\operatorname{im}{\left(a\right)}\right)^{2}\right)} + \frac{\left(\sqrt[4]{\left(2 \operatorname{re}{\left(b\right)} \operatorname{im}{\left(b\right)} - 4 \operatorname{im}{\left(a c\right)}\right)^{2} + \left(\left(\operatorname{re}{\left(b\right)}\right)^{2} - 4 \operatorname{re}{\left(a c\right)} - \left(\operatorname{im}{\left(b\right)}\right)^{2}\right)^{2}} \cos{\left(\frac{\operatorname{atan_{2}}{\left(2 \operatorname{re}{\left(b\right)} \operatorname{im}{\left(b\right)} - 4 \operatorname{im}{\left(a c\right)},\left(\operatorname{re}{\left(b\right)}\right)^{2} - 4 \operatorname{re}{\left(a c\right)} - \left(\operatorname{im}{\left(b\right)}\right)^{2} \right)}}{2} \right)} + \operatorname{re}{\left(b\right)}\right) \operatorname{im}{\left(a\right)}}{2 \left(\left(\operatorname{re}{\left(a\right)}\right)^{2} + \left(\operatorname{im}{\left(a\right)}\right)^{2}\right)}\right)$$
Решение параметрического уравнения
Дано уравнение с параметром:
$$a x^{2} + b x + c = 0$$
Коэффициент при x равен
$$a$$
тогда возможные случаи для a :
$$a < 0$$
$$a = 0$$
Рассмотри все случаи подробнее:
При
$$a < 0$$
уравнение будет
$$b x + c - x^{2} = 0$$
его решение
$$x = \frac{b}{2} - \frac{\sqrt{b^{2} + 4 c}}{2}$$
$$x = \frac{b}{2} + \frac{\sqrt{b^{2} + 4 c}}{2}$$
При
$$a = 0$$
уравнение будет
$$b x + c = 0$$
его решение
$$x = - \frac{c}{b}$$