2
$\begingroup$

I have two algebraic equations I am trying to solve in Maple. They are:

$14\,{a}^{26}{b}^{2}-91\,{a}^{24}{b}^{4}-364\,{a}^{22}{b}^{6}-1001\,{a} ^{20}{b}^{8}-2002\,{a}^{18}{b}^{10}-3003\,{a}^{16}{b}^{12}-3432\,{a}^{ 14}{b}^{14}-3003\,{a}^{12}{b}^{16}-2002\,{a}^{10}{b}^{18}-1001\,{a}^{8 }{b}^{20}-364\,{a}^{6}{b}^{22}-91\,{a}^{4}{b}^{24}-14\,{a}^{2}{b}^{26} -{b}^{28}-36\,{a}^{26}-396\,{a}^{24}{b}^{2}-1944\,{a}^{22}{b}^{4}-5544 \,{a}^{20}{b}^{6}-9900\,{a}^{18}{b}^{8}-10692\,{a}^{16}{b}^{10}-4752\, {a}^{14}{b}^{12}+4752\,{a}^{12}{b}^{14}+10692\,{a}^{10}{b}^{16}+9900\, {a}^{8}{b}^{18}+5544\,{a}^{6}{b}^{20}+1944\,{a}^{4}{b}^{22}+396\,{a}^{ 2}{b}^{24}+36\,{b}^{26}+1872\,{a}^{24}+16576\,{a}^{22}{b}^{2}+64672\,{ a}^{20}{b}^{4}+146880\,{a}^{18}{b}^{6}+220080\,{a}^{16}{b}^{8}+246144 \,{a}^{14}{b}^{10}+245952\,{a}^{12}{b}^{12}+246144\,{a}^{10}{b}^{14}+ 220080\,{a}^{8}{b}^{16}+146880\,{a}^{6}{b}^{18}+64672\,{a}^{4}{b}^{20} +16576\,{a}^{2}{b}^{22}+1872\,{b}^{24}-25792\,{a}^{22}-173248\,{a}^{20 }{b}^{2}-490560\,{a}^{18}{b}^{4}-756800\,{a}^{16}{b}^{6}-672640\,{a}^{ 14}{b}^{8}-258944\,{a}^{12}{b}^{10}+258944\,{a}^{10}{b}^{12}+672640\,{ a}^{8}{b}^{14}+756800\,{a}^{6}{b}^{16}+490560\,{a}^{4}{b}^{18}+173248 \,{a}^{2}{b}^{20}+25792\,{b}^{22}+198144\,{a}^{20}+1956864\,{a}^{18}{b }^{2}+6753792\,{a}^{16}{b}^{4}+11292672\,{a}^{14}{b}^{6}+10742784\,{a} ^{12}{b}^{8}+8890368\,{a}^{10}{b}^{10}+10742784\,{a}^{8}{b}^{12}+ 11292672\,{a}^{6}{b}^{14}+6753792\,{a}^{4}{b}^{16}+1956864\,{a}^{2}{b} ^{18}+198144\,{b}^{20}-731136\,{a}^{18}-12589056\,{a}^{16}{b}^{2}- 37822464\,{a}^{14}{b}^{4}-45244416\,{a}^{12}{b}^{6}-19279872\,{a}^{10} {b}^{8}+19279872\,{a}^{8}{b}^{10}+45244416\,{a}^{6}{b}^{12}+37822464\, {a}^{4}{b}^{14}+12589056\,{a}^{2}{b}^{16}+731136\,{b}^{18}-9461760\,{a }^{16}-30867456\,{a}^{14}{b}^{2}+287145984\,{a}^{12}{b}^{4}+369033216 \,{a}^{10}{b}^{6}+120963072\,{a}^{8}{b}^{8}+369033216\,{a}^{6}{b}^{10} +287145984\,{a}^{4}{b}^{12}-30867456\,{a}^{2}{b}^{14}-9461760\,{b}^{16 }+85622784\,{a}^{14}+350257152\,{a}^{12}{b}^{2}-255688704\,{a}^{10}{b} ^{4}-3238232064\,{a}^{8}{b}^{6}+3238232064\,{a}^{6}{b}^{8}+255688704\, {a}^{4}{b}^{10}-350257152\,{a}^{2}{b}^{12}-85622784\,{b}^{14}+ 137035776\,{a}^{12}-5009965056\,{a}^{10}{b}^{2}-3606773760\,{a}^{8}{b} ^{4}+24823726080\,{a}^{6}{b}^{6}-3606773760\,{a}^{4}{b}^{8}-5009965056 \,{a}^{2}{b}^{10}+137035776\,{b}^{12}-1408499712\,{a}^{10}-1054605312 \,{a}^{8}{b}^{2}+81891164160\,{a}^{6}{b}^{4}-81891164160\,{a}^{4}{b}^{ 6}+1054605312\,{a}^{2}{b}^{8}+1408499712\,{b}^{10}+1443889152\,{a}^{8} +56962842624\,{a}^{6}{b}^{2}-171624628224\,{a}^{4}{b}^{4}+56962842624 \,{a}^{2}{b}^{6}+1443889152\,{b}^{8}+13929283584\,{a}^{6}-97504985088 \,{a}^{4}{b}^{2}+97504985088\,{a}^{2}{b}^{4}-13929283584\,{b}^{6}=0$

and

$75\,{a}^{44}+1250\,{a}^{42}{b}^{2}+9325\,{a}^{40}{b}^{4}+39500\,{a}^{ 38}{b}^{6}+92625\,{a}^{36}{b}^{8}+37050\,{a}^{34}{b}^{10}-605625\,{a}^ {32}{b}^{12}-2713200\,{a}^{30}{b}^{14}-7025250\,{a}^{28}{b}^{16}- 13081500\,{a}^{26}{b}^{18}-18685550\,{a}^{24}{b}^{20}-20995000\,{a}^{ 22}{b}^{22}-18685550\,{a}^{20}{b}^{24}-13081500\,{a}^{18}{b}^{26}- 7025250\,{a}^{16}{b}^{28}-2713200\,{a}^{14}{b}^{30}-605625\,{a}^{12}{b }^{32}+37050\,{a}^{10}{b}^{34}+92625\,{a}^{8}{b}^{36}+39500\,{a}^{6}{b }^{38}+9325\,{a}^{4}{b}^{40}+1250\,{a}^{2}{b}^{42}+75\,{b}^{44}-6360\, {a}^{42}-124360\,{a}^{40}{b}^{2}-1141040\,{a}^{38}{b}^{4}-6517200\,{a} ^{36}{b}^{6}-25897560\,{a}^{34}{b}^{8}-75690120\,{a}^{32}{b}^{10}- 167296320\,{a}^{30}{b}^{12}-281699520\,{a}^{28}{b}^{14}-354817200\,{a} ^{26}{b}^{16}-309064080\,{a}^{24}{b}^{18}-123936800\,{a}^{22}{b}^{20}+ 123936800\,{a}^{20}{b}^{22}+309064080\,{a}^{18}{b}^{24}+354817200\,{a} ^{16}{b}^{26}+281699520\,{a}^{14}{b}^{28}+167296320\,{a}^{12}{b}^{30}+ 75690120\,{a}^{10}{b}^{32}+25897560\,{a}^{8}{b}^{34}+6517200\,{a}^{6}{ b}^{36}+1141040\,{a}^{4}{b}^{38}+124360\,{a}^{2}{b}^{40}+6360\,{b}^{42 }-286560\,{a}^{40}+1299840\,{a}^{38}{b}^{2}+50378944\,{a}^{36}{b}^{4}+ 401336704\,{a}^{34}{b}^{6}+1740940320\,{a}^{32}{b}^{8}+4901465600\,{a} ^{30}{b}^{10}+9580140800\,{a}^{28}{b}^{12}+13378708992\,{a}^{26}{b}^{ 14}+13616978752\,{a}^{24}{b}^{16}+10903809280\,{a}^{22}{b}^{18}+ 9196936320\,{a}^{20}{b}^{20}+10903809280\,{a}^{18}{b}^{22}+13616978752 \,{a}^{16}{b}^{24}+13378708992\,{a}^{14}{b}^{26}+9580140800\,{a}^{12}{ b}^{28}+4901465600\,{a}^{10}{b}^{30}+1740940320\,{a}^{8}{b}^{32}+ 401336704\,{a}^{6}{b}^{34}+50378944\,{a}^{4}{b}^{36}+1299840\,{a}^{2}{ b}^{38}-286560\,{b}^{40}+372661248\,{a}^{36}{b}^{2}-707820544\,{a}^{34 }{b}^{4}-13983124480\,{a}^{32}{b}^{6}-64604672000\,{a}^{30}{b}^{8}- 171060842496\,{a}^{28}{b}^{10}-301423489024\,{a}^{26}{b}^{12}- 369866092544\,{a}^{24}{b}^{14}-305887582208\,{a}^{22}{b}^{16}- 118022141952\,{a}^{20}{b}^{18}+118022141952\,{a}^{18}{b}^{20}+ 305887582208\,{a}^{16}{b}^{22}+369866092544\,{a}^{14}{b}^{24}+ 301423489024\,{a}^{12}{b}^{26}+171060842496\,{a}^{10}{b}^{28}+ 64604672000\,{a}^{8}{b}^{30}+13983124480\,{a}^{6}{b}^{32}+707820544\,{ a}^{4}{b}^{34}-372661248\,{a}^{2}{b}^{36}-64023552\,{b}^{38}- 4020256512\,{a}^{36}-25280404992\,{a}^{34}{b}^{2}-17689454336\,{a}^{32 }{b}^{4}+327596421120\,{a}^{30}{b}^{6}+1568612611072\,{a}^{28}{b}^{8}+ 3802104150016\,{a}^{26}{b}^{10}+5990533923840\,{a}^{24}{b}^{12}+ 6790271389696\,{a}^{22}{b}^{14}+6232580648448\,{a}^{20}{b}^{16}+ 5750651833344\,{a}^{18}{b}^{18}+6232580648448\,{a}^{16}{b}^{20}+ 6790271389696\,{a}^{14}{b}^{22}+5990533923840\,{a}^{12}{b}^{24}+ 3802104150016\,{a}^{10}{b}^{26}+1568612611072\,{a}^{8}{b}^{28}+ 327596421120\,{a}^{6}{b}^{30}-17689454336\,{a}^{4}{b}^{32}-25280404992 \,{a}^{2}{b}^{34}-4020256512\,{b}^{36}+141841483776\,{a}^{34}+ 812651771904\,{a}^{32}{b}^{2}+844669190144\,{a}^{30}{b}^{4}- 5879063412736\,{a}^{28}{b}^{6}-27045676376064\,{a}^{26}{b}^{8}- 58879853699072\,{a}^{24}{b}^{10}-81000773943296\,{a}^{22}{b}^{12}- 71903915409408\,{a}^{20}{b}^{14}-28790241103872\,{a}^{18}{b}^{16}+ 28790241103872\,{a}^{16}{b}^{18}+71903915409408\,{a}^{14}{b}^{20}+ 81000773943296\,{a}^{12}{b}^{22}+58879853699072\,{a}^{10}{b}^{24}+ 27045676376064\,{a}^{8}{b}^{26}+5879063412736\,{a}^{6}{b}^{28}- 844669190144\,{a}^{4}{b}^{30}-812651771904\,{a}^{2}{b}^{32}- 141841483776\,{b}^{34}-3238367662080\,{a}^{32}-15304336146432\,{a}^{30 }{b}^{2}-9340373663744\,{a}^{28}{b}^{4}+95140684300288\,{a}^{26}{b}^{6 }+333410977595392\,{a}^{24}{b}^{8}+614533778046976\,{a}^{22}{b}^{10}+ 845198215839744\,{a}^{20}{b}^{12}+1012450883862528\,{a}^{18}{b}^{14}+ 1081581115908096\,{a}^{16}{b}^{16}+1012450883862528\,{a}^{14}{b}^{18}+ 845198215839744\,{a}^{12}{b}^{20}+614533778046976\,{a}^{10}{b}^{22}+ 333410977595392\,{a}^{8}{b}^{24}+95140684300288\,{a}^{6}{b}^{26}- 9340373663744\,{a}^{4}{b}^{28}-15304336146432\,{a}^{2}{b}^{30}- 3238367662080\,{b}^{32}+50490836582400\,{a}^{30}+176086600974336\,{a}^ {28}{b}^{2}-152306959187968\,{a}^{26}{b}^{4}-1684710750093312\,{a}^{24 }{b}^{6}-3454899096584192\,{a}^{22}{b}^{8}-3298794461921280\,{a}^{20}{ b}^{10}-1445416723218432\,{a}^{18}{b}^{12}-194713331367936\,{a}^{16}{b }^{14}+194713331367936\,{a}^{14}{b}^{16}+1445416723218432\,{a}^{12}{b} ^{18}+3298794461921280\,{a}^{10}{b}^{20}+3454899096584192\,{a}^{8}{b}^ {22}+1684710750093312\,{a}^{6}{b}^{24}+152306959187968\,{a}^{4}{b}^{26 }-176086600974336\,{a}^{2}{b}^{28}-50490836582400\,{b}^{30}- 534649494896640\,{a}^{28}-1210295967940608\,{a}^{26}{b}^{2}+ 5724614944423936\,{a}^{24}{b}^{4}+26380886835724288\,{a}^{22}{b}^{6}+ 42048454899204096\,{a}^{20}{b}^{8}+30388730092978176\,{a}^{18}{b}^{10} +4724812444139520\,{a}^{16}{b}^{12}-7192176335781888\,{a}^{14}{b}^{14} +4724812444139520\,{a}^{12}{b}^{16}+30388730092978176\,{a}^{10}{b}^{18 }+42048454899204096\,{a}^{8}{b}^{20}+26380886835724288\,{a}^{6}{b}^{22 }+5724614944423936\,{a}^{4}{b}^{24}-1210295967940608\,{a}^{2}{b}^{26}- 534649494896640\,{b}^{28}+3286873284280320\,{a}^{26}+2713917651943424 \,{a}^{24}{b}^{2}-77284074436165632\,{a}^{22}{b}^{4}- 270542370073739264\,{a}^{20}{b}^{6}-349879051057889280\,{a}^{18}{b}^{8 }-213063378711085056\,{a}^{16}{b}^{10}-57015578923106304\,{a}^{14}{b}^ {12}+57015578923106304\,{a}^{12}{b}^{14}+213063378711085056\,{a}^{10}{ b}^{16}+349879051057889280\,{a}^{8}{b}^{18}+270542370073739264\,{a}^{6 }{b}^{20}+77284074436165632\,{a}^{4}{b}^{22}-2713917651943424\,{a}^{2} {b}^{24}-3286873284280320\,{b}^{26}+213111700193280\,{a}^{24}+ 70908012205703168\,{a}^{22}{b}^{2}+694283115155161088\,{a}^{20}{b}^{4} +2132555668861747200\,{a}^{18}{b}^{6}+1859501969611161600\,{a}^{16}{b} ^{8}+84575734147842048\,{a}^{14}{b}^{10}-75928100231184384\,{a}^{12}{b }^{12}+84575734147842048\,{a}^{10}{b}^{14}+1859501969611161600\,{a}^{8 }{b}^{16}+2132555668861747200\,{a}^{6}{b}^{18}+694283115155161088\,{a} ^{4}{b}^{20}+70908012205703168\,{a}^{2}{b}^{22}+213111700193280\,{b}^{ 24}-197112346768834560\,{a}^{22}-1313568123575599104\,{a}^{20}{b}^{2}- 4826743947927748608\,{a}^{18}{b}^{4}-15507264587736023040\,{a}^{16}{b} ^{6}-13320253101815365632\,{a}^{14}{b}^{8}+6228544173411139584\,{a}^{ 12}{b}^{10}-6228544173411139584\,{a}^{10}{b}^{12}+13320253101815365632 \,{a}^{8}{b}^{14}+15507264587736023040\,{a}^{6}{b}^{16}+ 4826743947927748608\,{a}^{4}{b}^{18}+1313568123575599104\,{a}^{2}{b}^{ 20}+197112346768834560\,{b}^{22}+1396772423168163840\,{a}^{20}+ 11608333269149417472\,{a}^{18}{b}^{2}+24257517869881884672\,{a}^{16}{b }^{4}+70758399650983575552\,{a}^{14}{b}^{6}+96421712044744507392\,{a}^ {12}{b}^{8}-128968645422643937280\,{a}^{10}{b}^{10}+ 96421712044744507392\,{a}^{8}{b}^{12}+70758399650983575552\,{a}^{6}{b} ^{14}+24257517869881884672\,{a}^{4}{b}^{16}+11608333269149417472\,{a}^ {2}{b}^{18}+1396772423168163840\,{b}^{20}-433185960612593664\,{a}^{18} -55461219976548974592\,{a}^{16}{b}^{2}-157656713576520351744\,{a}^{14} {b}^{4}-153912151266903982080\,{a}^{12}{b}^{6}-760803075000404803584\, {a}^{10}{b}^{8}+760803075000404803584\,{a}^{8}{b}^{10}+ 153912151266903982080\,{a}^{6}{b}^{12}+157656713576520351744\,{a}^{4}{ b}^{14}+55461219976548974592\,{a}^{2}{b}^{16}+433185960612593664\,{b}^ {18}-37561374368266715136\,{a}^{16}-32837068847629467648\,{a}^{14}{b}^ {2}+1163976553479951876096\,{a}^{12}{b}^{4}+42543947772724248576\,{a}^ {10}{b}^{6}+1705420374725986615296\,{a}^{8}{b}^{8}+ 42543947772724248576\,{a}^{6}{b}^{10}+1163976553479951876096\,{a}^{4}{ b}^{12}-32837068847629467648\,{a}^{2}{b}^{14}-37561374368266715136\,{b }^{16}+145123568542084497408\,{a}^{14}+2214786761572522917888\,{a}^{12 }{b}^{2}-2941686581914050232320\,{a}^{10}{b}^{4}- 10669449418591224987648\,{a}^{8}{b}^{6}+10669449418591224987648\,{a}^{ 6}{b}^{8}+2941686581914050232320\,{a}^{4}{b}^{10}- 2214786761572522917888\,{a}^{2}{b}^{12}-145123568542084497408\,{b}^{14 }+249314329329842257920\,{a}^{12}-7902762540911007105024\,{a}^{10}{b}^ {2}-25076225098692949966848\,{a}^{8}{b}^{4}+83375468150158025293824\,{ a}^{6}{b}^{6}-25076225098692949966848\,{a}^{4}{b}^{8}- 7902762540911007105024\,{a}^{2}{b}^{10}+249314329329842257920\,{b}^{12 }-2801419437596265676800\,{a}^{10}-4512413307974543474688\,{a}^{8}{b}^ {2}+160715735714773856157696\,{a}^{6}{b}^{4}-160715735714773856157696 \,{a}^{4}{b}^{6}+4512413307974543474688\,{a}^{2}{b}^{8}+ 2801419437596265676800\,{b}^{10}+157002242738903580672\,{a}^{8}+ 99495970498069735145472\,{a}^{6}{b}^{2}-282658247208303920676864\,{a}^ {4}{b}^{4}+99495970498069735145472\,{a}^{2}{b}^{6}+ 157002242738903580672\,{b}^{8}+15810272187369010495488\,{a}^{6}- 123591451896180620918784\,{a}^{4}{b}^{2}+123591451896180620918784\,{a} ^{2}{b}^{4}-15810272187369010495488\,{b}^{6}-3275378007362758508544\,{ a}^{4}+10917926691209195028480\,{a}^{2}{b}^{2}-3275378007362758508544 \,{b}^{4}=0 $

The plots of a vs b for both these equations on the same graph is:

Both equations on one plot

On the graph we can see that one intersection point is near (4,2). Thus, I tried using fsolve in MAPLE to get the exact point to which MAPLE returns {a = -3.984746496, b = 2.012958923}. But, apparently, when I put back this point into the two equations I get values nowhere close to zero. I also tried using fsolve in MATLAB but no success. Somebody please help me out in solving the two equtions simulataneously.

$\endgroup$
2
  • 2
    $\begingroup$ With finite-precision floating-point arithmetic you won't get exactly zero when you evaluate the equations with the approximate roots. Using more precision might work. Can you post the equations in a computer-readable form? $\endgroup$
    – Kirill
    Commented Oct 24, 2014 at 16:31
  • $\begingroup$ @zynga, you can export to Matlab, Fortran, C, Python, Java. That way the code can be used for someone to you. $\endgroup$
    – nicoguaro
    Commented Oct 24, 2014 at 18:56

1 Answer 1

1
$\begingroup$

I don't have Maple, but here is what Mathematica and sage can do with more precision (you can translate to Maple easily enough, whatever the equivalent of ContourPlot$+$findroot is in Maple). I am assuming you only want real solutions as that's the plot you show.

You seem to be using double precision ($\epsilon\sim 10^{-16}$), which is really not enough given the magnitude of the coefficients. In general, if you want $|f(x)| < \epsilon$, then $x$ needs to be calculated to absolute tolerance of $\epsilon/f'(x)$ or so, which in your case is quite a lot smaller than $10^{-16}$. Here is a plot I got (showing only the upper-right quadrant because of the symmetries $a\leftrightarrow\pm a$, $b\leftrightarrow\pm b$):

enter image description here

Some of the solutions are (correct to precision shown, rounded down): $$\begin{array}{ll} \qquad\qquad a&\qquad\qquad b\\ \\ \phantom{0}0 & 0 \\ \phantom{0}0 & 2 \\ \phantom{0}3.98474\ 64962\ 20780\ 16409 & 2.01295\ 89233\ 29253\ 09700 \\ \phantom{0}2.62879\ 31899\ 96391\ 17312 & 1.04246\ 44796\ 14921\ 50205 \\ \phantom{0}2.71903\ 38802\ 96411\ 81749 & 0.48706\ 36127\ 79289\ 48764 \\ 10.32488\ 52886\ 24114\ 42639 & 2.60867\ 53905\ 24137\ 19344 \\ 11.07895\ 38928\ 95562\ 05933 & 1.51714\ 09752\ 61487\ 55244 \\ \phantom{0}2.50539\ 67917\ 01949\ 47742 & 7.10235\ 60004\ 90840\ 74450 \\ \phantom{0}0.63002\ 82486\ 26931\ 58184 & 0.83043\ 91257\ 12434\ 04168 \\ \phantom{0}0.97964\ 68570\ 87606\ 69608 & 0.53405\ 74656\ 53849\ 71719 \\ \phantom{0}0.29529\ 36308\ 25062\ 10538 & 0.92298\ 29979\ 75984\ 57228 \end{array}$$ I calculated these to about 240 digits, checked their accuracy, then truncated them for display.

$\endgroup$
8
  • $\begingroup$ Did you try re-substituting for example {a=3.98474 64962 20780 16409, b=2.01295 89233 29253 09700} back into the equations, because MAPLE gives similar answers too, but on re-substitution I get values like 10^12 which is way way off from zero (which is what I am supposed to get). $\endgroup$
    – zynga
    Commented Oct 25, 2014 at 13:27
  • $\begingroup$ @zynga I substituted them (and got near-zero values) after I calculated them to about 240 digits; what I list here is the first 20 digits, not the actual values I calculated. Try calculating the roots to a much higher precision than the usual 15 digits. $\endgroup$
    – Kirill
    Commented Oct 25, 2014 at 13:31
  • $\begingroup$ Yup, 200 digits does the trick. Thanks a lot! $\endgroup$
    – zynga
    Commented Oct 25, 2014 at 14:05
  • $\begingroup$ @zynga: Commenting on your statement "I get values like 10^12 which is way way off from zero" -- that is a statement that doesn't actually make any sense. Yes, it's a large number, but you have to see it relative to the numbers you expect. For example, $10^12$ nanoseconds isn't all that much, but it's a large number. In your equations, you have terms such as $37561374368266715136 b^{16}\approx 4\cdot 10^{19} b^{16}$ which for any $b\ge 1$ is already very very large. Compared to this, $10^{12}$ is actually a very small number -- essentially zero, in fact. $\endgroup$ Commented Oct 26, 2014 at 4:54
  • $\begingroup$ @WolfgangBangerth What was causing the error to shoot up to 10^12 was the fact that I was using only 20 Digits. As soon I changed Digits to 200, the error went down to 10^-40. So, even though what you are saying may be right, it is immaterial as a user will be unable to identify whether the answer he got was the right one or not with an error like 10^12. $\endgroup$
    – zynga
    Commented Oct 26, 2014 at 8:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.