Linearing a non-linear problem don't yeild the same solution.

  • Thread starter Mamed
  • Start date
  • Tags
    Non-linear
In summary: So different methods give different answers.In summary, the speaker is discussing their approach to finding a curve that fits given data samples, using both a non-linear method and a linearized method. They mention that the solutions from the two methods are different and explain that this is because linearizing the function changes the problem. They also give an example of a simpler problem to illustrate this concept.
  • #1
Mamed
17
0
Hi

I have some data samples and and my job is to find a curve that will fit these values.
The curve that i have gone for is in the form

y = k * sqrt(d1^x*d2^y)*d3^z

where kxyz are all unknowns that I need to find. I solve this with the MATLAB function fminsearch and the solution is just fine.

I did also try linearize the problem by log

log(y) = log(k) + xlog(d1)/2 + ylog(d2)/2 +zlog(n)

And this i solved with the function lsqnonlin

I should mention that i use the least square solution sum(Ymeasured-Yanalytical)

Anyways this brings me to my question. These two don't give the same solution!

According to wikipedia
"
In LLSQ the solution is unique, but in NLLSQ there may be multiple minima in the sum of squares.
"
Which means that either I'm doing something wrong or the solution after linearizing isn't necessarily the optimal solution.

So

Is the solution of a linear function the optimal solution or not?

The solution of a non-linear is not unique while it is for a linear function.

Shouldn't the linear function give the same or a better solution than the non linear?

Thanks
 
Mathematics news on Phys.org
  • #2
With your first method you are minimizing [itex]\sum (y_m - y_e)^2[/itex].

When you take logs, you are minimizing [itex]\sum (\log y_m - \log y_e)^2[/itex].

That means you will get different answers even when there is a unique solution to the NLLSQ problem.
 
  • #3
But shouldn't the values of the parameters minimize both functions? Isnt the whole point of you linearizing the function so that you will have the best unique optimum, while the non-linear problem can have more than one solution and the one you have might just be a local minimum.
 
  • #4
Mamed said:
Isnt the whole point of you linearizing the function so that you will have the best unique optimum.

Linearizing the function makes it easier to solve, but it also changes the problem.

Take a similar but simpler problem. Find the value of a that minimizes [itex]y = e^{ax}[/itex].

The least squares sum is
[tex]\sum (y_i - e^{ax_i})^2 = \sum y_i^2 - 2y_i e^{ax_i} + e^{2ax_i}[/tex]
The minimum is when
[tex]\sum y_ix_i e^{ax_i} = \sum x_i e^{2ax_i}[/tex]

On the other hand if you take logs and minimize [itex]\log y = a \log x[/itex], the minimum value is just
[tex]a = \left(\sum \log y_i \right) / \left(\sum \log x_i \right)[/tex].
 
  • #5
for sharing your findings and observations. I can say that the solution of a linear function may not always be the optimal solution for a non-linear problem. This is because linearizing a non-linear problem can often result in a loss of information and complexity, leading to a less accurate solution. In some cases, linearizing a problem may lead to a better solution, but this is not always the case.

In your specific case, it seems that the non-linear function is giving a better solution than the linearized function. This could be because your non-linear function accounts for the complexity of the data better than the simplified linearized function. It is also possible that the linearized function has multiple local minima, which can lead to different solutions depending on the starting point of the optimization algorithm.

In general, it is important to carefully consider the nature of the problem and the data before deciding whether to linearize it or not. In some cases, linearization may be necessary for easier interpretation or computation, but it is not always the best approach for finding the most accurate solution.

I would suggest further exploring the reasons behind the different solutions and considering the implications of each before making a final decision on which approach to use. Good luck with your research!
 

1. What is meant by "linearizing" a non-linear problem?

Linearizing a non-linear problem involves transforming the non-linear problem into a linear problem, usually by using a mathematical technique such as linearization or approximation. This allows for easier solution of the problem as linear problems are typically simpler to solve.

2. Why might a non-linear problem not yield the same solution when linearized?

This can occur because linearization involves making simplifying assumptions and approximations, which can introduce errors into the solution. Additionally, non-linear problems often have multiple solutions, and linearization may only reveal one of these solutions.

3. How do you determine if a non-linear problem can be linearized?

A non-linear problem can typically be linearized if it can be approximated by a linear function over a small range of values. Additionally, the problem must have well-defined initial conditions and boundary conditions.

4. Are there any advantages to linearizing a non-linear problem?

Yes, there are several advantages to linearizing a non-linear problem. It can make the problem easier to solve and can provide insight into the behavior of the non-linear system. It also allows for the use of linear techniques and tools, which are often more readily available and well-studied.

5. Can linearization be used for any type of non-linear problem?

No, linearization is not always applicable to non-linear problems. It depends on the specific problem and its characteristics. Some non-linear problems may be too complex to be accurately approximated by a linear function, making linearization ineffective.

Similar threads

Replies
8
Views
2K
Replies
2
Views
239
  • Calculus and Beyond Homework Help
Replies
5
Views
281
Replies
6
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
312
Replies
3
Views
724
  • Calculus and Beyond Homework Help
Replies
2
Views
266
  • Differential Equations
Replies
4
Views
954
  • General Math
Replies
23
Views
7K
Back
Top