How to fit a complex equation?

In summary, Z(x)=(50*m+m^2*tanh((a+b*i)*x))/(m+50*tanh((a+b*i)*x)) is a function where i is an imaginary unit, x is the independent variable, Z is the dependent variable, and a, b, and m are parameters. By measuring Z at discrete values of x, we can determine the parameter values of a, b, and m that correspond to the data. A common method for this is to do a least square fit, finding the minimum of the function f(a,b,m)= Sum (k=1,20) |Z(k)-Zk|^2. This requires finding the derivatives with respect to a, b, and m and then
  • #1
bitele
3
0
Z(x)=(50*m+m^2*tanh((a+b*i)*x))/(m+50*tanh((a+b*i)*x))
where i is imaginary unit, x is the independent variable, Z is the dependent variable, and a, b and m are the parameters.
We measures variable Z at a discrete set of values of variable x:
x=[1, 2, 3, 4, ...20]
Z=[57.6286+0.6328*i, 57.1207+0.6694*i, 56.9751+0.6525*i, 58.4018+0.6432*i, 57.2407+0.6809*i, 57.4864+0.6892*i, 58.7988+0.6761*i, 59.6706+0.7166*i, 58.5738+0.6758*i, 59.1651+0.6283*i, 58.4831+0.6437*i, 59.6807+0.6949*i, 58.6072+0.6453*i, 58.5499+0.6452*i, 60.0737+0.7014*i, 59.3941+0.6916*i, 58.7153+0.7090*i, 58.5133+0.6446*i, 60.8528+0.6817*i, 60.7193+0.6810*i]

We want to know what parameter values of a, b and m correspond to the data.
 
Mathematics news on Phys.org
  • #2
In order to make the problem more dramatic, more elegant, you can calculate the mean value, plot a graph, add the data points with different colors, predict which one is closest, check the value of Z when subtituting data into its functon, etc etc etc
 
  • #3
bitele said:
Z(x)=(50*m+m^2*tanh((a+b*i)*x))/(m+50*tanh((a+b*i)*x))
where i is imaginary unit, x is the independent variable, Z is the dependent variable, and a, b and m are the parameters.
We measures variable Z at a discrete set of values of variable x:
x=[1, 2, 3, 4, ...20]
Z=[57.6286+0.6328*i, 57.1207+0.6694*i, 56.9751+0.6525*i, 58.4018+0.6432*i, 57.2407+0.6809*i, 57.4864+0.6892*i, 58.7988+0.6761*i, 59.6706+0.7166*i, 58.5738+0.6758*i, 59.1651+0.6283*i, 58.4831+0.6437*i, 59.6807+0.6949*i, 58.6072+0.6453*i, 58.5499+0.6452*i, 60.0737+0.7014*i, 59.3941+0.6916*i, 58.7153+0.7090*i, 58.5133+0.6446*i, 60.8528+0.6817*i, 60.7193+0.6810*i]

We want to know what parameter values of a, b and m correspond to the data.

The usual method in cases like this is to do a least square fit, that is find the minimum of:

f(a,b,m)=Sum (k=1,20) |Z(k)-Zk|2
It might be messy, but you need to get the derivatives of with respect to a, b, and m. If m has to be an integer, use the integers closest to the value you get. Then recompute a and b for both cases and see which is better.
 
  • #4
Hi Bitele,

The time to edit has elapsed on your current post, so just copy and paste it into a new post here and make your corrections. Just state that the new post in this thread is a correction of the original.
 

1. How do I determine the coefficients for a complex equation?

The coefficients for a complex equation can be determined by using a variety of methods such as least squares regression, curve fitting, or using software programs specifically designed for solving complex equations.

2. Can I use a standard regression model for fitting a complex equation?

No, a standard regression model is not suitable for fitting a complex equation as it assumes a linear relationship between the variables. Complex equations often involve non-linear relationships and require specialized methods for fitting.

3. What is the best way to validate the fit of a complex equation?

The best way to validate the fit of a complex equation is by using statistical measures such as root mean square error, R-squared value, and residual analysis. These measures can help determine the accuracy and precision of the fit.

4. How many data points do I need to fit a complex equation?

The number of data points needed to fit a complex equation depends on the complexity of the equation and the desired level of accuracy. Generally, more data points will result in a more accurate fit, but this can also depend on the quality and distribution of the data.

5. Can I use a complex equation to make predictions?

Yes, once a complex equation has been fitted to a set of data, it can be used to make predictions for new data points within the range of the original data. However, it is important to validate the predictive power of the equation on a separate set of data before using it for making predictions.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
265
Back
Top