Comparing FSOLVE and SOLVE results on the equation
2 次查看(过去 30 天)
显示 更早的评论
Why this code give different solutions. The result are: hasil1 = 195.3125, meanwhile hasil2 = -0.038231287058791666198155528190197.
I still hesitate to use those function, since the results are different. When I use FSOLVE, the process is faster than SOLVE function. I take long time to get results if I use SOLVE. The result should be like "hasil2". How to use FSOLVE but the result is like "hasil2".
syms x;
eq1 ='(65.0549/x)-(6.7203)+(75.7207)-(((2.7272^x)*(1.0033)+(1.59^x)*(0.46376)+(2.4506^x)*(0.89632)+(2.6129^x)*(0.96046)+(1.367^x)*(0.31264)+(0.39284^x)*(-0.93436)+(1.5651^x)*(0.44795)+(1.5083^x)*(0.41096)+(0.81499^x)*(-0.20458)+(1.6526^x)*(0.50236)+(1.7819^x)*(0.5777)+(2.4563^x)*(0.89867)+(0.88014^x)*(-0.12768)+(2.5081^x)*(0.91954)+(2.741^x)*(1.0083)+(1.8194^x)*(0.59851)+(2.033^x)*(0.70951)+(1.6526^x)*(0.50236)+(2.4283^x)*(0.88718)+(1.2561^x)*(0.22802)+(0.67065^x)*(-0.39951)+(1.4447^x)*(0.36793)+(0.49793^x)*(-0.69729)+(1.2089^x)*(0.18969)+(2.3449^x)*(0.85226)+(0.49793^x)*(-0.69729)+(0.39284^x)*(-0.93436)+(0.49793^x)*(-0.69729)+(1.8122^x)*(0.59453)+(0.12951^x)*(-2.044)+(0.58896^x)*(-0.5294)+(2.6787^x)*(0.98533)+(0.39284^x)*(-0.93436)+(2.7946^x)*(1.0277)+(1.7509^x)*(0.56012)+(1.9784^x)*(0.68228)+(2.4229^x)*(0.88499)+(1.2561^x)*(0.22802)+(1.742^x)*(0.55506)+(2.0081^x)*(0.69717)+(1.2864^x)*(0.25188)+(2.3003^x)*(0.83305)+(0.19421^x)*(-1.6388)+(1.616^x)*(0.47995)+(2.521^x)*(0.92467)+(0.88014^x)*(-0.12768)+(1.5459^x)*(0.43562)+(2.0526^x)*(0.7191)+(0.74549^x)*(-0.29371)+(2.505^x)*(0.91829)+(1.8026^x)*(0.58922)+(1.671^x)*(0.51344)+(2.0037^x)*(0.69501)+(2.5104^x)*(0.92042)+(1.6863^x)*(0.52251)+(0.74549^x)*(-0.29371)+(1.4695^x)*(0.38492)+(1.719^x)*(0.54174)+(1.9258^x)*(0.65532)+(1.8122^x)*(0.59453)+(0.39284^x)*(-0.93436)+(0.49793^x)*(-0.69729)+(2.2284^x)*(0.80128)+(2.2822^x)*(0.82514)+(1.3017^x)*(0.26365)+(2.0761^x)*(0.73051)+(2.4563^x)*(0.89867)+(2.7046^x)*(0.99495)+(1.6818^x)*(0.51988)+(0.26185^x)*(-1.34)+(0.39284^x)*(-0.93436)+(0.39284^x)*(-0.93436)+(0.12951^x)*(-2.044)+(0.74549^x)*(-0.29371)+(0.39284^x)*(-0.93436)+(0.58896^x)*(-0.5294)+(0.19421^x)*(-1.6388)+(0.88014^x)*(-0.12768)+(0.58896^x)*(-0.5294)+(0.26185^x)*(-1.34)+(0.26185^x)*(-1.34)+(0.26185^x)*(-1.34)+(0.39284^x)*(-0.93436)+(0.26185^x)*(-1.34)+(2.794^x)*(1.0275)+(1.8122^x)*(0.59453)+(0.26185^x)*(-1.34)+(0.39284^x)*(-0.93436)+(0.26185^x)*(-1.34)+(0.67065^x)*(-0.39951)+(1.1598^x)*(0.14828)+(0.74549^x)*(-0.29371)+(1.2561^x)*(0.22802)+(0.58896^x)*(-0.5294)+(1^x)*(0)+(0.26185^x)*(-1.34)+(2.0761^x)*(0.73051)+(1^x)*(0)+(1.3017^x)*(0.26365)+(1.0556^x)*(0.054134)+(15.5^x)*(2.7408)+(39.8^x)*(3.6839)+(21.3^x)*(3.0587)+(18.2^x)*(2.9014)+(48.5^x)*(3.8816)+(0.43909^x)*(-0.82306)+(40.6^x)*(3.7038)+(1.3342^x)*(0.28833)+(0.8833^x)*(-0.12408)+(1.4989^x)*(0.40476)+(1.7148^x)*(0.53932)+(5.6044^x)*(1.7236)+(0.92732^x)*(-0.075461)+(6.1406^x)*(1.8149)+(9.382^x)*(2.2388)+(33.6^x)*(3.5145)+(29^x)*(3.3673)+(1.4989^x)*(0.40476)+(5.3253^x)*(1.6725)+(1.1463^x)*(0.13656)+(0.76761^x)*(-0.26448)+(45^x)*(3.8067)+(0.58191^x)*(-0.54144)+(1.1182^x)*(0.11173)+(23.2^x)*(3.1442)+(0.58191^x)*(-0.54144)+(0.43909^x)*(-0.82306)+(0.58191^x)*(-0.54144)+(1.7786^x)*(0.57585)+(0.066358^x)*(-2.7127)+(0.6872^x)*(-0.37513)+(8.2378^x)*(2.1087)+(0.43909^x)*(-0.82306)+(11.9993^x)*(2.4848)+(1.6552^x)*(0.50391)+(2.2596^x)*(0.81518)+(21.8^x)*(3.0819)+(1.1463^x)*(0.13656)+(35.5^x)*(3.5695)+(29.5^x)*(3.3844)+(53^x)*(3.9703)+(24^x)*(3.1781)+(0.1433^x)*(-1.9428)+(39^x)*(3.6636)+(20^x)*(2.9957)+(0.92732^x)*(-0.075461)+(1.3715^x)*(0.31589)+(2.5677^x)*(0.94299)+(0.83123^x)*(-0.18485)+(20.3^x)*(3.0106)+(34^x)*(3.5264)+(37.4^x)*(3.6217)+(2.3572^x)*(0.85748)+(20.2^x)*(3.0057)+(1.5475^x)*(0.43663)+(0.83123^x)*(-0.18485)+(1.2991^x)*(0.26165)+(1.5995^x)*(0.46968)+(2.0796^x)*(0.73218)+(1.7786^x)*(0.57585)+(0.43909^x)*(-0.82306)+(0.58191^x)*(-0.54144)+(25.3^x)*(3.2308)+(4.0161^x)*(1.3903)+(1.1748^x)*(0.16111)+(2.6803^x)*(0.98592)+(5.6044^x)*(1.7236)+(8.6599^x)*(2.1587)+(37.1^x)*(3.6136)+(0.24083^x)*(-1.4237)+(0.43909^x)*(-0.82306)+(0.43909^x)*(-0.82306)+(0.066358^x)*(-2.7127)+(0.83123^x)*(-0.18485)+(0.43909^x)*(-0.82306)+(0.6872^x)*(-0.37513)+(0.1433^x)*(-1.9428)+(0.92732^x)*(-0.075461)+(0.6872^x)*(-0.37513)+(0.24083^x)*(-1.4237)+(0.24083^x)*(-1.4237)+(0.24083^x)*(-1.4237)+(0.43909^x)*(-0.82306)+(0.24083^x)*(-1.4237)+(12.2995^x)*(2.5096)+(1.7786^x)*(0.57585)+(0.24083^x)*(-1.4237)+(0.43909^x)*(-0.82306)+(0.24083^x)*(-1.4237)+(0.76761^x)*(-0.26448)+(1.0901^x)*(0.086228)+(0.83123^x)*(-0.18485)+(1.1463^x)*(0.13656)+(0.6872^x)*(-0.37513)+(1^x)*(0)+(0.24083^x)*(-1.4237)+(2.6803^x)*(0.98592)+(1^x)*(0)+(1.1748^x)*(0.16111)+(1.0316^x)*(0.031109)+0)/(1.1088^(x*65.0549)))+((((2.7272^x)+(1.59^x)+(2.4506^x)+(2.6129^x)+(1.367^x)+(0.39284^x)+(1.5651^x)+(1.5083^x)+(0.81499^x)+(1.6526^x)+(1.7819^x)+(2.4563^x)+(0.88014^x)+(2.5081^x)+(2.741^x)+(1.8194^x)+(2.033^x)+(1.6526^x)+(2.4283^x)+(1.2561^x)+(0.67065^x)+(1.4447^x)+(0.49793^x)+(1.2089^x)+(2.3449^x)+(0.49793^x)+(0.39284^x)+(0.49793^x)+(1.8122^x)+(0.12951^x)+(0.58896^x)+(2.6787^x)+(0.39284^x)+(2.7946^x)+(1.7509^x)+(1.9784^x)+(2.4229^x)+(1.2561^x)+(1.742^x)+(2.0081^x)+(1.2864^x)+(2.3003^x)+(0.19421^x)+(1.616^x)+(2.521^x)+(0.88014^x)+(1.5459^x)+(2.0526^x)+(0.74549^x)+(2.505^x)+(1.8026^x)+(1.671^x)+(2.0037^x)+(2.5104^x)+(1.6863^x)+(0.74549^x)+(1.4695^x)+(1.719^x)+(1.9258^x)+(1.8122^x)+(0.39284^x)+(0.49793^x)+(2.2284^x)+(2.2822^x)+(1.3017^x)+(2.0761^x)+(2.4563^x)+(2.7046^x)+(1.6818^x)+(0.26185^x)+(0.39284^x)+(0.39284^x)+(0.12951^x)+(0.74549^x)+(0.39284^x)+(0.58896^x)+(0.19421^x)+(0.88014^x)+(0.58896^x)+(0.26185^x)+(0.26185^x)+(0.26185^x)+(0.39284^x)+(0.26185^x)+(2.794^x)+(1.8122^x)+(0.26185^x)+(0.39284^x)+(0.26185^x)+(0.67065^x)+(1.1598^x)+(0.74549^x)+(1.2561^x)+(0.58896^x)+(1^x)+(0.26185^x)+(2.0761^x)+(1^x)+(1.3017^x)+(1.0556^x)+(15.5^x)+(39.8^x)+(21.3^x)+(18.2^x)+(48.5^x)+(0.43909^x)+(40.6^x)+(1.3342^x)+(0.8833^x)+(1.4989^x)+(1.7148^x)+(5.6044^x)+(0.92732^x)+(6.1406^x)+(9.382^x)+(33.6^x)+(29^x)+(1.4989^x)+(5.3253^x)+(1.1463^x)+(0.76761^x)+(45^x)+(0.58191^x)+(1.1182^x)+(23.2^x)+(0.58191^x)+(0.43909^x)+(0.58191^x)+(1.7786^x)+(0.066358^x)+(0.6872^x)+(8.2378^x)+(0.43909^x)+(11.9993^x)+(1.6552^x)+(2.2596^x)+(21.8^x)+(1.1463^x)+(35.5^x)+(29.5^x)+(53^x)+(24^x)+(0.1433^x)+(39^x)+(20^x)+(0.92732^x)+(1.3715^x)+(2.5677^x)+(0.83123^x)+(20.3^x)+(34^x)+(37.4^x)+(2.3572^x)+(20.2^x)+(1.5475^x)+(0.83123^x)+(1.2991^x)+(1.5995^x)+(2.0796^x)+(1.7786^x)+(0.43909^x)+(0.58191^x)+(25.3^x)+(4.0161^x)+(1.1748^x)+(2.6803^x)+(5.6044^x)+(8.6599^x)+(37.1^x)+(0.24083^x)+(0.43909^x)+(0.43909^x)+(0.066358^x)+(0.83123^x)+(0.43909^x)+(0.6872^x)+(0.1433^x)+(0.92732^x)+(0.6872^x)+(0.24083^x)+(0.24083^x)+(0.24083^x)+(0.43909^x)+(0.24083^x)+(12.2995^x)+(1.7786^x)+(0.24083^x)+(0.43909^x)+(0.24083^x)+(0.76761^x)+(1.0901^x)+(0.83123^x)+(1.1463^x)+(0.6872^x)+(1^x)+(0.24083^x)+(2.6803^x)+(1^x)+(1.1748^x)+(1.0316^x)+0)*6.7203)/(1.1088^(x*65.0549)))';
hasil1 = fsolve(eq1,1);
hasil2 = solve(eq1,'x');
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Calculus 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!