After a process usyng the SymPy in Julia, I generated a system of nonlinear equations. For the sake of simplicity, I am going to put an approximation here for the case of just a non-linear equation. What I get is something like this equation:
R = (p) -> -5.0488*p + p^2.81 - 3.38/( p^(-1.0) )^2.0
I can plot the R function
using Plots
plot(R, 0,8)
We can see that the R function has two zeros: p = 0 and 5.850< p < 8.75. I would like to find the positive zero. For this, I tryed the nlsolve function but with error:
using NLsolve
nlsolve(R , 5.8)
MethodError: no method matching nlsolve(::var"#1337#1338", ::Float64)
Closest candidates are:
nlsolve(::Any, ::Any, !Matched::AbstractArray; inplace, kwargs...)
First, Where am I going wrong with the nlsolve function?
If possible, I will appreciate a solution using SymPy package in Julia.