Discussion Overview
The discussion revolves around the challenges of using the FindFit function in Mathematica to fit a two-parameter logarithmic model to a set of data points. Participants explore issues related to complex values, variable naming conflicts, and alternative fitting methods.
Discussion Character
- Technical explanation
- Debate/contested
- Mathematical reasoning
Main Points Raised
- One participant reports an error when using FindFit, indicating that the function returns complex values instead of real numbers.
- Another participant suggests that the variable names C and D conflict with predefined meanings in Mathematica, recommending the use of lowercase c and d instead.
- Concerns are raised about the nature of the logarithmic function being fitted, particularly regarding the square root term that can lead to complex results for certain values of c.
- A different approach using NMinimize is proposed, which yields specific values for c and d that appear to work better than FindFit.
- One participant mentions having derived a curve from boundary conditions, suggesting that a solution exists despite issues with FindFit.
- There is a discussion about Mathematica's limitations in handling complex-valued functions and the importance of providing good starting points for fitting.
- Another participant shares that using the absolute value in NMinimize can help avoid issues with complex numbers, leading to successful parameter estimation.
Areas of Agreement / Disagreement
Participants express differing views on the reasons for FindFit's failure, with some attributing it to variable naming and others to the nature of the function being fitted. There is no consensus on a single solution, as multiple approaches and perspectives are presented.
Contextual Notes
Participants note that the function being fitted can yield complex values, which complicates the fitting process. There are also references to the need for good initial parameter estimates to improve the chances of success with FindFit.
Who May Find This Useful
This discussion may be useful for Mathematica users encountering issues with fitting functions, particularly those involving logarithmic or complex-valued models.