Questions tagged [nonlinear-equation]

79 questions
0
votes
0 answers

Matlab 'popov' function

Given a transfer function, e.g. numerator = [0, 1, 0, -.5] % s^2-0.5 = s^2 +0.5 denominator = [1, 1, 1, 1] % (s+1)(s^2+1) = s^3+ s^2+s+1 G1 = tf(numerator, denominator) Is it possible to determine if this system is absolutely…
0
votes
1 answer

system of non-linear algebraic equations not converging with SymPy 'nsolve'

I have written the following code for finding the solution of system of three non-linear algebraic equations (Nonlinear_eq_1, Nonlinear_eq_2 and Nonlinear_eq_3). import sympy as smp import scipy as sp import numpy as np pi = np.pi #…
iKD
  • 1
  • 1
0
votes
0 answers

a non-linear polynomial equation as a user defined input in python

I have a non-linear polynomial equation example: 2*x**2 - sin(x) + 1. how will I code to take this equation as a user input i tried using eval() function but how will i describe the x s= input("enter your equation here") equation = eval(s)
0
votes
0 answers

How to solve non linear equation in R?

I want to solve a non linear function in R using a loop for 71 years of data. The equation looks like this: y(i) == -1/k*log(1-k(xi - beta/alpha)) where xi is the value present in the dataset. For the first data the equation looks like…
0
votes
3 answers

sympy.solve(), m equations, n unknowns, n > m, find one unknown expressed in terms of n - m - 1 other unknowns

This is a question on using the Sympy solve() function in Python. I am limited by my understanding of all the options for sympy.solve(). I am trying to use the symbolic solver to do the following: Suppose I have 5 equations in 8 variables…
sb4
  • 169
  • 1
  • 6
0
votes
1 answer

Regarding the use of 'nsolve' of sympy to find the solution of system of non-linear algebraic equations

I am a researcher in the field of solid mechanics and new to this website as far as asking the question side is concerned. I am trying to use nsolve of sympy to find solutions of system of non-linear algebraic equations. My system has three…
iKD
  • 1
  • 1
0
votes
0 answers

why I get an empty list in my output in python?

I work with sympy and I have three symbolic variables (y , p_s , p_h). I want to solve the equation in terms of p_s and p_h, solving y in terms of p_s and p_h. My code is as follows when I run it, give me an empty list output. I don't know what is…
NaTa
  • 1
  • 1
0
votes
0 answers

Slow convergence on sparse non linear system of equations

I am trying to implement a solution of a dynamic EDP system with two independent variables (t,z). I already discretized the problem and fed into scipy.optimize.newton_krylov. The overall system is non linear because of some extra non linear…
Klaus3
  • 153
  • 5
0
votes
0 answers

Python - Implementing leapfrog integration for nonlinear spring force, overflow encountered in double_scalars

I'm trying to deal with a trivial SHM equation which has a non linear term alpha included to the spring force. (https://i.stack.imgur.com/lrrDP.png) So far, I have the following code for a leapfrog integration, which I attempted to solve…
0
votes
0 answers

How to resolve "unclassifable error statement" in Fortran

Please I need help with fixing the "unclassifiable statement error" I get when I try to call a function rtsafe, which finds the root of a nonlinear algebraic equation; using the Newton-Raphson and bisection method. The function takes in three…
Tommy
  • 1
  • 2
0
votes
0 answers

Solving a rectangular system of nonlinear equations with GSL

I want to program a C++ code able to solve a set of equation systems which are generally nonlinear. I am already able to solve a system of m equations with n variables using GSL when m = n by following its documentation. However, often I have fewer…
0
votes
0 answers

how can i resolve error non-numeric argument to binary operator

i was trying to generate parameter estimate for a nonlinear equation using r. i guess the starting points but i got the following error message: "error in exp^-((Ht - h5/(b1))) : non-numeric argument to binary operator" Ht and h5 are variables in…
T.awesome
  • 1
  • 2
0
votes
1 answer

Solving equation of motion due to (Lorentz acceleration) using Forward Euler and Runge-Kutta 4th order using Python 3

I am tring to solve the equation of motion of charged particle in planetary magnetic field to see the path of the particle using Forward Euler's and RK5 method in python (as an excercise in learning Numerical methods) I encounter two problems: The…
0
votes
0 answers

I want to creat a matrix in a loop that adds the new data each time to the same matrix

my code is this ` x0=input('Enter first guess (Must be grater than 0): '); e=input('Enter the desired telorance : '); n=input(['Enter the desired number of ' ... 'Iteration (Must be grater than 0): ']); for…
0
votes
0 answers

Can I obtain all of the solutions to system of equations in GAMS?

I have a system of non-linear equations, which may or may not have a unique solution. The default GAMS mixed complementary problem (MCP) solver returns one solution to this system (when it exists). For example, the system x-y=0 x-y2=0 has two…
Chris
  • 1
  • 1