Questions tagged [nonlinear-functions]

A function that does not validate the additivity or homogeneity properties is characterized as non-linear.

In mathematics, a linear function (or map) f(x) is one which satisfies both of the following properties:

  • Additivity or superposition: f(x + y) = f(x) + f(y)
  • Homogeneity: f(alpha * x) = alpha * f(x)

A function that does not confirm the above is characterized as non-linear.

374 questions
20
votes
2 answers

Solving non-linear equations in python

I have 4 non-linear equations with three unknowns X, Y, and Z that I want to solve for. The equations are of the form: F(m) = X^2 + a(m)Y^2 + b(m)XYcosZ + c(m)XYsinZ ...where a, b and c are constants which are dependent on each value of F in the…
user1171835
  • 1,193
  • 2
  • 9
  • 12
18
votes
3 answers

R: Using equation with natural logarithm in nls

Good day, I am struggling with R and natural logarithm (ln). Firstly, I cannot find a ln(x) function in R. I have noticed that log(x) is the same as ln(x) (when using ln(x) with a calculator). In R: log(5) = 1.609438 And with a calculator: ln(5)…
wernerfeuer
  • 525
  • 2
  • 7
  • 17
12
votes
6 answers

How to enumerate x^2 + y^2 = z^2 - 1 (with additional constraints)

Lets N be a number (10<=N<=10^5). I have to break it into 3 numbers (x,y,z) such that it validates the following conditions. 1. x<=y<=z 2. x^2+y^2=z^2-1; 3. x+y+z<=N I have to find how many combinations I can get from the given numbers in a…
A_Sk
  • 4,532
  • 3
  • 27
  • 51
12
votes
7 answers

How to find minimum of nonlinear, multivariate function using Newton's method (code not linear algebra)

I'm trying to do some parameter estimation and want to choose parameter estimates that minimize the square error in a predicted equation over about 30 variables. If the equation were linear, I would just compute the 30 partial derivatives, set them…
Norman Ramsey
  • 198,648
  • 61
  • 360
  • 533
10
votes
2 answers

expand 1 dim vector by using taylor series of log(1+e^x) in python

I need to non-linearly expand on each pixel value from 1 dim pixel vector with taylor series expansion of specific non-linear function (e^x or log(x) or log(1+e^x)), but my current implementation is not right to me at least based on taylor series…
10
votes
1 answer

Error in optim: function cannot be evaluated at initial parameters

So I've run into this weird error in R. I have a simple function which returns an error term when comparing real and simulated prices, called hestondifferences(). when I try to find the local minima via: res<-optim(fn=hestondifferences, par =…
jcfrei
  • 1,819
  • 4
  • 19
  • 35
9
votes
2 answers

Solve this equation with fixed point iteration

How can I solve this equation x3 + x - 1 = 0 using fixed point iteration? Is there any fixed-point iteration code (especially in Python) I can find online?
9
votes
4 answers

Constrained optimization for nonlinear multivariable function in Java

I am looking for an open source implementation of a method doing constrained optimization for nonlinear multivariable function in Java.
seinecle
  • 10,118
  • 14
  • 61
  • 120
8
votes
1 answer

Singular gradient error during bootstrapped nls fit to bad data

I have a dataset containing an independent variable and a set of dependent variables. I'd like to fit a function to each set of independent variables, using a bootstrapped nonlinear least squares procedure. In some cases, the independent variables…
Drew Steen
  • 16,045
  • 12
  • 62
  • 90
7
votes
1 answer

Matlab : Unable to get unique rationals when implementing a formula for binary to real number conversion Part1

There is a nonlinear dynamic system x_n = f(x_n,eta) whose functional form is x[n+1] = 2*x[n] mod 1. This is a chaotic dynamical system called as the Sawtooth map or the Bernoulli Map. I am facing difficulty in implementing the two representations…
SKM
  • 959
  • 2
  • 19
  • 45
6
votes
2 answers

Splines inside nonlinear least squares in R

Consider a nonlinear least squares model in R, for example of the following form): y ~ theta / ( 1 + exp( -( alpha + beta * x) ) ) (my real problem has several variables and the outer function is not logistic but a bit more involved; this one is…
Glen_b
  • 7,883
  • 2
  • 37
  • 48
6
votes
1 answer

Comparing fsolve results in python and matlab

I have a follow up question to the post written a couple days ago, thank you for the previous feedback: Finding complex roots from set of non-linear equations in python I have gotten the set non-linear equations set up in python now so that fsolve…
6
votes
2 answers

Finding complex roots from set of non-linear equations in python

I have been testing an algorithm that has been published in literature that involves solving a set of 'm' non-linear equations in both Matlab and Python. The set of non-linear equations involves input variables that contain complex numbers, and…
6
votes
1 answer

An algorithm for checking if a nonlinear function f is always positive

Is there an algorithm to check if a given (possibly nonlinear) function f is always positive? The idea that I currently have is to find the roots of the function (using newton-raphson algorithm or similar techniques, see…
5
votes
1 answer

Find zero of a nonlinear equation using Julia

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 =…
Fam
  • 507
  • 2
  • 8
1
2 3
24 25