(-y - 1)*exp(-y) = c - x^2/2 (уравнение)

Учитель очень удивится увидев твоё верное решение 😼

Неизвестное в уравнении :

Искать численное решение на промежутке:

[, ]

    Найду корень уравнения: (-y - 1)*exp(-y) = c - x^2/2

    Решение

    Вы ввели [src]
                        2
              -y       x 
    (-y - 1)*e   = c - --
                       2 
    $$\left(- y - 1\right) e^{- y} = c - \frac{x^{2}}{2}$$
    Подробное решение
    Перенесём правую часть уравнения в
    левую часть уравнения со знаком минус.

    Уравнение превратится из
    $$\left(- y - 1\right) e^{- y} = c - \frac{x^{2}}{2}$$
    в
    $$\left(- c + \frac{x^{2}}{2}\right) + \left(- y - 1\right) e^{- y} = 0$$
    Раскроем выражение в уравнении
    $$\left(- c + \frac{x^{2}}{2}\right) + \left(- y - 1\right) e^{- y} = 0$$
    Получаем квадратное уравнение
    $$- c + \frac{x^{2}}{2} - y e^{- y} - e^{- y} = 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 - это дискриминант.
    Т.к.
    $$a = \frac{1}{2}$$
    $$b = 0$$
    $$c = - c - y e^{- y} - e^{- y}$$
    , то
    D = b^2 - 4 * a * c = 

    (0)^2 - 4 * (1/2) * (-c - exp(-y) - y*exp(-y)) = 2*c + 2*exp(-y) + 2*y*exp(-y)

    Уравнение имеет два корня.
    x1 = (-b + sqrt(D)) / (2*a)

    x2 = (-b - sqrt(D)) / (2*a)

    или
    $$x_{1} = \sqrt{2 c + 2 y e^{- y} + 2 e^{- y}}$$
    $$x_{2} = - \sqrt{2 c + 2 y e^{- y} + 2 e^{- y}}$$
    График
    Быстрый ответ [src]
                     _____________________________________________________________________________________________________________________________________________________________________________                                                                                                                                                                                                _____________________________________________________________________________________________________________________________________________________________________________                                                                                                                                                                                 
                    /                                                                                    2                                                                                      2     /     //          /   y\\             -re(y)   /              /   y\\  -re(y)             /          /   y\\  -re(y)              /              /   y\\             -re(y)\\              /                                                                                    2                                                                                      2     /     //          /   y\\             -re(y)   /              /   y\\  -re(y)             /          /   y\\  -re(y)              /              /   y\\             -re(y)\\
             ___ 4 /  //          /   y\\             -re(y)   /              /   y\\  -re(y)           \    //          /   y\\  -re(y)              /              /   y\\             -re(y)\      |atan2\\im(y) + im\c*e //*cos(im(y))*e       - \1 + re(y) + re\c*e //*e      *sin(im(y)), \im(y) + im\c*e //*e      *sin(im(y)) + \1 + re(y) + re\c*e //*cos(im(y))*e      /|       ___ 4 /  //          /   y\\             -re(y)   /              /   y\\  -re(y)           \    //          /   y\\  -re(y)              /              /   y\\             -re(y)\      |atan2\\im(y) + im\c*e //*cos(im(y))*e       - \1 + re(y) + re\c*e //*e      *sin(im(y)), \im(y) + im\c*e //*e      *sin(im(y)) + \1 + re(y) + re\c*e //*cos(im(y))*e      /|
    x1 = - \/ 2 *\/   \\im(y) + im\c*e //*cos(im(y))*e       - \1 + re(y) + re\c*e //*e      *sin(im(y))/  + \\im(y) + im\c*e //*e      *sin(im(y)) + \1 + re(y) + re\c*e //*cos(im(y))*e      /  *cos|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| - I*\/ 2 *\/   \\im(y) + im\c*e //*cos(im(y))*e       - \1 + re(y) + re\c*e //*e      *sin(im(y))/  + \\im(y) + im\c*e //*e      *sin(im(y)) + \1 + re(y) + re\c*e //*cos(im(y))*e      /  *sin|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
                                                                                                                                                                                                      \                                                                                     2                                                                                     /                                                                                                                                                                                                \                                                                                     2                                                                                     /
    $$x_{1} = - \sqrt{2} i \sqrt[4]{\left(\left(\operatorname{im}{\left(y\right)} + \operatorname{im}{\left(c e^{y}\right)}\right) e^{- \operatorname{re}{\left(y\right)}} \sin{\left(\operatorname{im}{\left(y\right)} \right)} + \left(\operatorname{re}{\left(y\right)} + \operatorname{re}{\left(c e^{y}\right)} + 1\right) e^{- \operatorname{re}{\left(y\right)}} \cos{\left(\operatorname{im}{\left(y\right)} \right)}\right)^{2} + \left(\left(\operatorname{im}{\left(y\right)} + \operatorname{im}{\left(c e^{y}\right)}\right) e^{- \operatorname{re}{\left(y\right)}} \cos{\left(\operatorname{im}{\left(y\right)} \right)} - \left(\operatorname{re}{\left(y\right)} + \operatorname{re}{\left(c e^{y}\right)} + 1\right) e^{- \operatorname{re}{\left(y\right)}} \sin{\left(\operatorname{im}{\left(y\right)} \right)}\right)^{2}} \sin{\left(\frac{\operatorname{atan_{2}}{\left(\left(\operatorname{im}{\left(y\right)} + \operatorname{im}{\left(c e^{y}\right)}\right) e^{- \operatorname{re}{\left(y\right)}} \cos{\left(\operatorname{im}{\left(y\right)} \right)} - \left(\operatorname{re}{\left(y\right)} + \operatorname{re}{\left(c e^{y}\right)} + 1\right) e^{- \operatorname{re}{\left(y\right)}} \sin{\left(\operatorname{im}{\left(y\right)} \right)},\left(\operatorname{im}{\left(y\right)} + \operatorname{im}{\left(c e^{y}\right)}\right) e^{- \operatorname{re}{\left(y\right)}} \sin{\left(\operatorname{im}{\left(y\right)} \right)} + \left(\operatorname{re}{\left(y\right)} + \operatorname{re}{\left(c e^{y}\right)} + 1\right) e^{- \operatorname{re}{\left(y\right)}} \cos{\left(\operatorname{im}{\left(y\right)} \right)} \right)}}{2} \right)} - \sqrt{2} \sqrt[4]{\left(\left(\operatorname{im}{\left(y\right)} + \operatorname{im}{\left(c e^{y}\right)}\right) e^{- \operatorname{re}{\left(y\right)}} \sin{\left(\operatorname{im}{\left(y\right)} \right)} + \left(\operatorname{re}{\left(y\right)} + \operatorname{re}{\left(c e^{y}\right)} + 1\right) e^{- \operatorname{re}{\left(y\right)}} \cos{\left(\operatorname{im}{\left(y\right)} \right)}\right)^{2} + \left(\left(\operatorname{im}{\left(y\right)} + \operatorname{im}{\left(c e^{y}\right)}\right) e^{- \operatorname{re}{\left(y\right)}} \cos{\left(\operatorname{im}{\left(y\right)} \right)} - \left(\operatorname{re}{\left(y\right)} + \operatorname{re}{\left(c e^{y}\right)} + 1\right) e^{- \operatorname{re}{\left(y\right)}} \sin{\left(\operatorname{im}{\left(y\right)} \right)}\right)^{2}} \cos{\left(\frac{\operatorname{atan_{2}}{\left(\left(\operatorname{im}{\left(y\right)} + \operatorname{im}{\left(c e^{y}\right)}\right) e^{- \operatorname{re}{\left(y\right)}} \cos{\left(\operatorname{im}{\left(y\right)} \right)} - \left(\operatorname{re}{\left(y\right)} + \operatorname{re}{\left(c e^{y}\right)} + 1\right) e^{- \operatorname{re}{\left(y\right)}} \sin{\left(\operatorname{im}{\left(y\right)} \right)},\left(\operatorname{im}{\left(y\right)} + \operatorname{im}{\left(c e^{y}\right)}\right) e^{- \operatorname{re}{\left(y\right)}} \sin{\left(\operatorname{im}{\left(y\right)} \right)} + \left(\operatorname{re}{\left(y\right)} + \operatorname{re}{\left(c e^{y}\right)} + 1\right) e^{- \operatorname{re}{\left(y\right)}} \cos{\left(\operatorname{im}{\left(y\right)} \right)} \right)}}{2} \right)}$$
                   _____________________________________________________________________________________________________________________________________________________________________________                                                                                                                                                                                                _____________________________________________________________________________________________________________________________________________________________________________                                                                                                                                                                                 
                  /                                                                                    2                                                                                      2     /     //          /   y\\             -re(y)   /              /   y\\  -re(y)             /          /   y\\  -re(y)              /              /   y\\             -re(y)\\              /                                                                                    2                                                                                      2     /     //          /   y\\             -re(y)   /              /   y\\  -re(y)             /          /   y\\  -re(y)              /              /   y\\             -re(y)\\
           ___ 4 /  //          /   y\\             -re(y)   /              /   y\\  -re(y)           \    //          /   y\\  -re(y)              /              /   y\\             -re(y)\      |atan2\\im(y) + im\c*e //*cos(im(y))*e       - \1 + re(y) + re\c*e //*e      *sin(im(y)), \im(y) + im\c*e //*e      *sin(im(y)) + \1 + re(y) + re\c*e //*cos(im(y))*e      /|       ___ 4 /  //          /   y\\             -re(y)   /              /   y\\  -re(y)           \    //          /   y\\  -re(y)              /              /   y\\             -re(y)\      |atan2\\im(y) + im\c*e //*cos(im(y))*e       - \1 + re(y) + re\c*e //*e      *sin(im(y)), \im(y) + im\c*e //*e      *sin(im(y)) + \1 + re(y) + re\c*e //*cos(im(y))*e      /|
    x2 = \/ 2 *\/   \\im(y) + im\c*e //*cos(im(y))*e       - \1 + re(y) + re\c*e //*e      *sin(im(y))/  + \\im(y) + im\c*e //*e      *sin(im(y)) + \1 + re(y) + re\c*e //*cos(im(y))*e      /  *cos|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + I*\/ 2 *\/   \\im(y) + im\c*e //*cos(im(y))*e       - \1 + re(y) + re\c*e //*e      *sin(im(y))/  + \\im(y) + im\c*e //*e      *sin(im(y)) + \1 + re(y) + re\c*e //*cos(im(y))*e      /  *sin|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
                                                                                                                                                                                                    \                                                                                     2                                                                                     /                                                                                                                                                                                                \                                                                                     2                                                                                     /
    $$x_{2} = \sqrt{2} i \sqrt[4]{\left(\left(\operatorname{im}{\left(y\right)} + \operatorname{im}{\left(c e^{y}\right)}\right) e^{- \operatorname{re}{\left(y\right)}} \sin{\left(\operatorname{im}{\left(y\right)} \right)} + \left(\operatorname{re}{\left(y\right)} + \operatorname{re}{\left(c e^{y}\right)} + 1\right) e^{- \operatorname{re}{\left(y\right)}} \cos{\left(\operatorname{im}{\left(y\right)} \right)}\right)^{2} + \left(\left(\operatorname{im}{\left(y\right)} + \operatorname{im}{\left(c e^{y}\right)}\right) e^{- \operatorname{re}{\left(y\right)}} \cos{\left(\operatorname{im}{\left(y\right)} \right)} - \left(\operatorname{re}{\left(y\right)} + \operatorname{re}{\left(c e^{y}\right)} + 1\right) e^{- \operatorname{re}{\left(y\right)}} \sin{\left(\operatorname{im}{\left(y\right)} \right)}\right)^{2}} \sin{\left(\frac{\operatorname{atan_{2}}{\left(\left(\operatorname{im}{\left(y\right)} + \operatorname{im}{\left(c e^{y}\right)}\right) e^{- \operatorname{re}{\left(y\right)}} \cos{\left(\operatorname{im}{\left(y\right)} \right)} - \left(\operatorname{re}{\left(y\right)} + \operatorname{re}{\left(c e^{y}\right)} + 1\right) e^{- \operatorname{re}{\left(y\right)}} \sin{\left(\operatorname{im}{\left(y\right)} \right)},\left(\operatorname{im}{\left(y\right)} + \operatorname{im}{\left(c e^{y}\right)}\right) e^{- \operatorname{re}{\left(y\right)}} \sin{\left(\operatorname{im}{\left(y\right)} \right)} + \left(\operatorname{re}{\left(y\right)} + \operatorname{re}{\left(c e^{y}\right)} + 1\right) e^{- \operatorname{re}{\left(y\right)}} \cos{\left(\operatorname{im}{\left(y\right)} \right)} \right)}}{2} \right)} + \sqrt{2} \sqrt[4]{\left(\left(\operatorname{im}{\left(y\right)} + \operatorname{im}{\left(c e^{y}\right)}\right) e^{- \operatorname{re}{\left(y\right)}} \sin{\left(\operatorname{im}{\left(y\right)} \right)} + \left(\operatorname{re}{\left(y\right)} + \operatorname{re}{\left(c e^{y}\right)} + 1\right) e^{- \operatorname{re}{\left(y\right)}} \cos{\left(\operatorname{im}{\left(y\right)} \right)}\right)^{2} + \left(\left(\operatorname{im}{\left(y\right)} + \operatorname{im}{\left(c e^{y}\right)}\right) e^{- \operatorname{re}{\left(y\right)}} \cos{\left(\operatorname{im}{\left(y\right)} \right)} - \left(\operatorname{re}{\left(y\right)} + \operatorname{re}{\left(c e^{y}\right)} + 1\right) e^{- \operatorname{re}{\left(y\right)}} \sin{\left(\operatorname{im}{\left(y\right)} \right)}\right)^{2}} \cos{\left(\frac{\operatorname{atan_{2}}{\left(\left(\operatorname{im}{\left(y\right)} + \operatorname{im}{\left(c e^{y}\right)}\right) e^{- \operatorname{re}{\left(y\right)}} \cos{\left(\operatorname{im}{\left(y\right)} \right)} - \left(\operatorname{re}{\left(y\right)} + \operatorname{re}{\left(c e^{y}\right)} + 1\right) e^{- \operatorname{re}{\left(y\right)}} \sin{\left(\operatorname{im}{\left(y\right)} \right)},\left(\operatorname{im}{\left(y\right)} + \operatorname{im}{\left(c e^{y}\right)}\right) e^{- \operatorname{re}{\left(y\right)}} \sin{\left(\operatorname{im}{\left(y\right)} \right)} + \left(\operatorname{re}{\left(y\right)} + \operatorname{re}{\left(c e^{y}\right)} + 1\right) e^{- \operatorname{re}{\left(y\right)}} \cos{\left(\operatorname{im}{\left(y\right)} \right)} \right)}}{2} \right)}$$