0
$\begingroup$

I have a function which has a dependency on x alone. I wanted to find the roots of this equation, so I tried plotting the equation, but I am getting the error "integer expected at position 2 in Surd[0.204286, 4.]". My equation as terms like the fourth root of x. How to solve this issue. My primary objective is to plot this det function. and the secondary objective is to find the roots of this equation using NSolve.

P=-0.000487443 x^(3/2) Cosh[0.0839293 Surd[x, 4.]] Sin[0.0419647 Surd[x, 4.]] Sin[0.0839293 Surd[x, 4.]] Sinh[0.0419647 Surd[x, 4.]] Surd[x, 4.]^7+0.000410809 x^(3/2) Cos[0.0000792465 Sqrt[x]] Cosh[0.0839293 Surd[x, 4.]] Sin[0.0419647 Surd[x, 4.]] Sin[0.0839293 Surd[x, 4.]] Sinh[0.0419647 Surd[x, 4.]] Surd[x, 4.]^7-3.03769*10^-7 x^2 Cosh[0.0839293 Surd[x, 4.]] Sin[0.0000792465 Sqrt[x]] Sin[0.0419647 Surd[x, 4.]] Sin[0.0839293 Surd[x, 4.]] Sinh[0.0419647 Surd[x, 4.]] Surd[x, 4.]^7-0.000487443 x^(3/2) Cosh[0.0419647 Surd[x, 4.]] Sin[0.0419647 Surd[x, 4.]] Sin[0.0839293 Surd[x, 4.]] Sinh[0.0839293 Surd[x, 4.]] Surd[x, 4.]^7+0.000410809 x^(3/2) Cos[0.0000792465 Sqrt[x]] Cosh[0.0419647 Surd[x, 4.]] Sin[0.0419647 Surd[x, 4.]] Sin[0.0839293 Surd[x, 4.]] Sinh[0.0839293 Surd[x, 4.]] Surd[x, 4.]^7-3.03769*10^-7 x^2 Cosh[0.0419647 Surd[x, 4.]] Sin[0.0000792465 Sqrt[x]] Sin[0.0419647 Surd[x, 4.]] Sin[0.0839293 Surd[x, 4.]] Sinh[0.0839293 Surd[x, 4.]] Surd[x, 4.]^7+0.000487443 x^(3/2) Cos[0.0839293 Surd[x, 4.]] Sin[0.0419647 Surd[x, 4.]] Sinh[0.0419647 Surd[x, 4.]] Sinh[0.0839293 Surd[x, 4.]] Surd[x, 4.]^7-0.000410809 x^(3/2) Cos[0.0000792465 Sqrt[x]] Cos[0.0839293 Surd[x, 4.]] Sin[0.0419647 Surd[x, 4.]] Sinh[0.0419647 Surd[x, 4.]] Sinh[0.0839293 Surd[x, 4.]] Surd[x, 4.]^7+3.03769*10^-7 x^2 Cos[0.0839293 Surd[x, 4.]] Sin[0.0000792465 Sqrt[x]] Sin[0.0419647 Surd[x, 4.]] Sinh[0.0419647 Surd[x, 4.]] Sinh[0.0839293 Surd[x, 4.]] Surd[x, 4.]^7+0.000487443 x^(3/2) Cos[0.0419647 Surd[x, 4.]] Sin[0.0839293 Surd[x, 4.]] Sinh[0.0419647 Surd[x, 4.]] Sinh[0.0839293 Surd[x, 4.]] Surd[x, 4.]^7-0.000410809 x^(3/2) Cos[0.0000792465 Sqrt[x]] Cos[0.0419647 Surd[x, 4.]] Sin[0.0839293 Surd[x, 4.]] Sinh[0.0419647 Surd[x, 4.]] Sinh[0.0839293 Surd[x, 4.]] Surd[x, 4.]^7+3.03769*10^-7 x^2 Cos[0.0419647 Surd[x, 4.]] Sin[0.0000792465 Sqrt[x]] Sin[0.0839293 Surd[x, 4.]] Sinh[0.0419647 Surd[x, 4.]] Sinh[0.0839293 Surd[x, 4.]] Surd[x, 4.]^7-1.21576*10^-8 Sqrt[x] Cos[0.0000792465 Sqrt[x]] Cos[0.0839293 Surd[x, 4.]] Cosh[0.0839293 Surd[x, 4.]] Sin[0.0419647 Surd[x, 4.]] Sinh[0.0419647 Surd[x, 4.]] Surd[x, 4.]^10-1.21576*10^-8 Sqrt[x] Cos[0.0000792465 Sqrt[x]] Cos[0.0419647 Surd[x, 4.]] Cosh[0.0839293 Surd[x, 4.]] Sin[0.0839293 Surd[x, 4.]] Sinh[0.0419647 Surd[x, 4.]] Surd[x, 4.]^10-1.21576*10^-8 Sqrt[x] Cos[0.0000792465 Sqrt[x]] Cos[0.0839293 Surd[x, 4.]] Cosh[0.0419647 Surd[x, 4.]] Sin[0.0419647 Surd[x, 4.]] Sinh[0.0839293 Surd[x, 4.]] Surd[x, 4.]^10-1.21576*10^-8 Sqrt[x] Cos[0.0000792465 Sqrt[x]] Cos[0.0419647 Surd[x, 4.]] Cosh[0.0419647 Surd[x, 4.]] Sin[0.0839293 Surd[x, 4.]] Sinh[0.0839293 Surd[x, 4.]] Surd[x, 4.]^10;
Plot[P, {x, 0, 10000}]
$\endgroup$
  • 1
    $\begingroup$ As stated by the error message, the second argument of Surd[] should be an Integer, i.e., you need to replace Surd[x, 4.] with Surd[x, 4]. $\endgroup$ – Anjan Kumar Jun 1 at 16:58
  • $\begingroup$ I did define like this in my input , it is like Surd[expression,4]. I dont know why in determinant it is coming like Surd[expression,4.] $\endgroup$ – acoustics Jun 1 at 17:01
  • 1
    $\begingroup$ If that's the case, then you can do this: Q = P/.Surd[m_, n_]:>Surd[m, Round[n]], and then Plot[] Q. $\endgroup$ – Anjan Kumar Jun 1 at 17:09
  • $\begingroup$ It works, thanks. $\endgroup$ – acoustics Jun 1 at 17:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.