I am getting a cryptic error when trying to solve this system:
using StaticArrays
using NonlinearSolve
function f!(F, x, _)
F[1] = (x[1] + 3) * (x[2]^3 - 7) + 18
F[2] = sin(x[2] * exp(x[1]) - 1)
return F
end
x0 = [0.1; 1.2]
x0s = MVector{size(x0)...}(x0)
prob = NonlinearProblem{true}(f!, x0s)
julia> solver = NonlinearSolve.solve(prob, NewtonRaphson(), tol=1e-9)
ERROR: UndefVarError: Tridiagonal not defined
Stacktrace:
[1] (::NonlinearSolve.DefaultLinSolve)(x::MVector{2, Float64}, A::MMatrix{2, 2, Float64, 4}, b::MVector{2, Float64}, update_matrix::Bool; tol::Nothing, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ NonlinearSolve ~/.julia/packages/NonlinearSolve/KTnKV/src/utils.jl:151
[2] DefaultLinSolve
@ ~/.julia/packages/NonlinearSolve/KTnKV/src/utils.jl:133 [inlined]
[3] perform_step(solver::NonlinearSolve.NewtonImmutableSolver{NonlinearFunction{true, typeof(f!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED_NO_TIME), Nothing}, NewtonRaphson{12, true, DataType, NonlinearSolve.DefaultLinSolve}, MVector{2, Float64}, MVector{2, Float64}, SciMLBase.NullParameters, typeof(NonlinearSolve.DEFAULT_NORM), Float64, NonlinearSolve.NewtonRaphsonCache{NonlinearSolve.JacobianWrapper{NonlinearFunction{true, typeof(f!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED_NO_TIME), Nothing}, SciMLBase.NullParameters}, NonlinearSolve.DefaultLinSolve, MMatrix{2, 2, Float64, 4}, MVector{2, Float64}, ForwardDiff.JacobianConfig{ForwardDiff.Tag{NonlinearSolve.JacobianWrapper{NonlinearFunction{true, typeof(f!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED_NO_TIME), Nothing}, SciMLBase.NullParameters}, Float64}, Float64, 2, Tuple{MVector{2, ForwardDiff.Dual{ForwardDiff.Tag{NonlinearSolve.JacobianWrapper{NonlinearFunction{true, typeof(f!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED_NO_TIME), Nothing}, SciMLBase.NullParameters}, Float64}, Float64, 2}}, MVector{2, ForwardDiff.Dual{ForwardDiff.Tag{NonlinearSolve.JacobianWrapper{NonlinearFunction{true, typeof(f!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED_NO_TIME), Nothing}, SciMLBase.NullParameters}, Float64}, Float64, 2}}}}}}, alg::NewtonRaphson{12, true, DataType, NonlinearSolve.DefaultLinSolve}, #unused#::Val{true})
@ NonlinearSolve ~/.julia/packages/NonlinearSolve/KTnKV/src/raphson.jl:46
[4] solve!(solver::NonlinearSolve.NewtonImmutableSolver{NonlinearFunction{true, typeof(f!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED_NO_TIME), Nothing}, NewtonRaphson{12, true, DataType, NonlinearSolve.DefaultLinSolve}, MVector{2, Float64}, MVector{2, Float64}, SciMLBase.NullParameters, typeof(NonlinearSolve.DEFAULT_NORM), Float64, NonlinearSolve.NewtonRaphsonCache{NonlinearSolve.JacobianWrapper{NonlinearFunction{true, typeof(f!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED_NO_TIME), Nothing}, SciMLBase.NullParameters}, NonlinearSolve.DefaultLinSolve, MMatrix{2, 2, Float64, 4}, MVector{2, Float64}, ForwardDiff.JacobianConfig{ForwardDiff.Tag{NonlinearSolve.JacobianWrapper{NonlinearFunction{true, typeof(f!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED_NO_TIME), Nothing}, SciMLBase.NullParameters}, Float64}, Float64, 2, Tuple{MVector{2, ForwardDiff.Dual{ForwardDiff.Tag{NonlinearSolve.JacobianWrapper{NonlinearFunction{true, typeof(f!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED_NO_TIME), Nothing}, SciMLBase.NullParameters}, Float64}, Float64, 2}}, MVector{2, ForwardDiff.Dual{ForwardDiff.Tag{NonlinearSolve.JacobianWrapper{NonlinearFunction{true, typeof(f!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED_NO_TIME), Nothing}, SciMLBase.NullParameters}, Float64}, Float64, 2}}}}}})
@ NonlinearSolve ~/.julia/packages/NonlinearSolve/KTnKV/src/solve.jl:64
[5] solve(::NonlinearProblem{MVector{2, Float64}, true, SciMLBase.NullParameters, NonlinearFunction{true, typeof(f!), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED_NO_TIME), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}, ::NewtonRaphson{12, true, DataType, NonlinearSolve.DefaultLinSolve}; kwargs::Base.Pairs{Symbol, Float64, Tuple{Symbol}, NamedTuple{(:tol,), Tuple{Float64}}})
@ NonlinearSolve ~/.julia/packages/NonlinearSolve/KTnKV/src/solve.jl:5
[6] top-level scope
@ REPL[7]:1
I tried to follow the documentation, what am I missing? it seems that I need to load another package?