Ошибка в solve

Форум пользователей пакета Maple

Модератор: Admin

Markiyan Hirnyk
Сообщения: 1340
Зарегистрирован: Вс дек 04, 2011 11:07 pm

Ошибка в solve

Сообщение Markiyan Hirnyk » Ср май 22, 2019 6:25 pm

Реже сообщаю Мэйпловские ошибки, ибо реже им пользуюсь. Вот очередная ошибка:

Код: Выделить всё

sol := solve({b >= -Pi, x >= -Pi, y >= -Pi, sin(x)+sin(y) = sin(b), sin(2*x)+sin(2*y) = sin(2*b), b < Pi, x < Pi, y < Pi}, {x, y}, explicit);
Warning, solutions may have been lost
 piecewise(b < -Pi, [], b < Pi, [{x = 0, y = b}, {x = b, y = 0}, {x = arctan((1/2)*sin(b)-(1/2)*3^(1/2)*abs(cos(b)), -(1/2)*3^(1/2)*signum(cos(b))*sin(b)-(1/2)*cos(b)), y = arctan((1/2)*sin(b)+(1/2)*3^(1/2)*abs(cos(b)), ((-2*cos(b)*abs(cos(b))+signum(cos(b)))*3^(1/2)+2*sin(b)*cos(b))/(2*3^(1/2)*abs(cos(b))+2*sin(b)))}, {x = arctan((1/2)*sin(b)-(1/2)*3^(1/2)*abs(cos(b)), -(1/2)*3^(1/2)*signum(cos(b))*sin(b)-(1/2)*cos(b)), y = arctan((1/2)*sin(b)-(1/2)*3^(1/2)*abs(cos(b)), ((-2*cos(b)*abs(cos(b))+signum(cos(b)))*3^(1/2)+2*sin(b)*cos(b))/(2*3^(1/2)*abs(cos(b))+2*sin(b)))}, {x = arctan((1/2)*sin(b)+(1/2)*3^(1/2)*abs(cos(b)), (1/2)*3^(1/2)*signum(cos(b))*sin(b)-(1/2)*cos(b)), y = arctan((1/2)*sin(b)+(1/2)*3^(1/2)*abs(cos(b)), ((-2*cos(b)*abs(cos(b))+signum(cos(b)))*3^(1/2)-2*sin(b)*cos(b))/(2*3^(1/2)*abs(cos(b))-2*sin(b)))}, {x = arctan((1/2)*sin(b)+(1/2)*3^(1/2)*abs(cos(b)), (1/2)*3^(1/2)*signum(cos(b))*sin(b)-(1/2)*cos(b)), y = arctan((1/2)*sin(b)-(1/2)*3^(1/2)*abs(cos(b)), ((-2*cos(b)*abs(cos(b))+signum(cos(b)))*3^(1/2)-2*sin(b)*cos(b))/(2*3^(1/2)*abs(cos(b))-2*sin(b)))}], Pi <= b, [])

Проверка:

Код: Выделить всё

seq(simplify(eval({b >= -Pi, sin(x)+sin(y) = sin(b), sin(2*x)+sin(2*y) = sin(2*b), b < Pi}, [b = (1/4)*Pi, op(sol1[j])])), j = 1 .. 7);
{1 = 1, (1/2)*sqrt(2) = (1/2)*sqrt(2), -Pi <= (1/4)*Pi, (1/4)*Pi < Pi}, {1 = 1, (1/2)*sqrt(2) = (1/2)*sqrt(2), -Pi <= (1/4)*Pi, (1/4)*Pi < Pi}, {1 = 1, (1/2)*sqrt(2) = (1/2)*sqrt(2), -Pi <= (1/4)*Pi, (1/4)*Pi < Pi}, {1 = 1, (1/2)*sqrt(2) = (1/2)*sqrt(2), -Pi <= (1/4)*Pi, (1/4)*Pi < Pi}, {-1/2 = 1, -(1/4)*(2+sqrt(3))*(sqrt(3)-1)*sqrt(2) = (1/2)*sqrt(2), -Pi <= (1/4)*Pi, (1/4)*Pi < Pi}, {-1/2 = 1, (1/4)*sqrt(3)*(1+sqrt(3))*sqrt(2) = (1/2)*sqrt(2), -Pi <= (1/4)*Pi, (1/4)*Pi < Pi}, {1 = 1, (1/2)*sqrt(2) = (1/2)*sqrt(2), -Pi <= (1/4)*Pi, (1/4)*Pi < Pi}

plots:-implicitplot([sin(x)+sin(y) = 1/sqrt(2), sin(2*x)+sin(2*y) = 1], x = -Pi .. Pi, y = -Pi .. Pi, color = [red, blue]);

Одно решение пропущено, два -ложные. Математика решает эту систему правильно.

Markiyan Hirnyk
Сообщения: 1340
Зарегистрирован: Вс дек 04, 2011 11:07 pm

Re: Ошибка в solve

Сообщение Markiyan Hirnyk » Пн июн 03, 2019 12:41 pm

Во- первых, добавлю пропущенное выше

Код: Выделить всё

sol1 := solve(eval({b >= -Pi, x >= -Pi, y >= -Pi, sin(x)+sin(y) = sin(b), sin(2*x)+sin(2*y) = sin(2*b), b < Pi, x < Pi, y < Pi},b=Pi/4), {x, y}, explicit);

Во-вторых, Мэйпл 2019.1 выдает четыре правильные решения и пропускает два решения. Мэйпл прогрессирует.