- #1

Thanos_ST

- 2

- 4

- TL;DR Summary
- Equation solved numerically with vpasolve does not provide accurate solution. The solution is extracted from a PhD Thesis and was verified with Mathematica's numeric solver.

Hello everyone,

I have an equation derived as the det of a matrix, which I have solved in Mathematica 11 with Findroot and verified with the respective PhD Thesis' data. However, I now try to get more accustomed to Matlab (R2017b) and hence I tried to reproduce the problem and find its solution at this platform with vpasolve.

To my surprise, the Matlab solution is different! I also saw the plot, and it differs as well from the one Mathematica produces (which matches the one on the PhD Thesis). I even specify the solution of Mathematica to define the area (else the initial solution of Matlab is vastly different, see below).

So my code is the following:

And the solution I get is 3.9407331356929149250770292025221 (instead of 4.73004). If I do not specify the area of the initial solution, the answer is -226.94495142003040084517833499812.

What am I doing wrong?

Thank you for reading my post.

I have an equation derived as the det of a matrix, which I have solved in Mathematica 11 with Findroot and verified with the respective PhD Thesis' data. However, I now try to get more accustomed to Matlab (R2017b) and hence I tried to reproduce the problem and find its solution at this platform with vpasolve.

To my surprise, the Matlab solution is different! I also saw the plot, and it differs as well from the one Mathematica produces (which matches the one on the PhD Thesis). I even specify the solution of Mathematica to define the area (else the initial solution of Matlab is vastly different, see below).

So my code is the following:

Code:

```
syms L
B = [(-cos(L)+cosh(L))/(2*L^2) (-sin(L)+sinh(L))/(2*L^3); (-L*sin(L)+L*sinh(L))/(2*L^2) (-L*cos(L)+L*cosh(L))/(2*L^3)]
vpasolve (det(B) == 0, L, 4.7000) % L=4.73004 is the initial solution derived from Mathematica %
fplot (det(B), [-10, 10])
```

And the solution I get is 3.9407331356929149250770292025221 (instead of 4.73004). If I do not specify the area of the initial solution, the answer is -226.94495142003040084517833499812.

What am I doing wrong?

Thank you for reading my post.

Last edited: