# New to ROOT, hoping it has a solution to my problem. Tried to fit a curve using GSL

**URL:** <https://root-forum.cern.ch/t/new-to-root-hoping-it-has-a-solution-to-my-problem-tried-to-fit-a-curve-using-gsl/54064>\
**Category:** ROOT\
**Created:** [March 16, 2023, 10:42am UTC](https://root-forum.cern.ch/t/new-to-root-hoping-it-has-a-solution-to-my-problem-tried-to-fit-a-curve-using-gsl/54064 "2023-03-16T10:42:00Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [March 16, 2023, 3:26pm UTC](https://root-forum.cern.ch/t/new-to-root-hoping-it-has-a-solution-to-my-problem-tried-to-fit-a-curve-using-gsl/54064/6 "2023-03-16T15:26:07Z")

</div>

I don’t really understand what you expect / miss.

I tried “GSL 2.7.1” and “GSL 1.15” and for both of them, I got almost the same output when I tried:  
`grep -r gsl_multifit_fsolver /usr/include/gsl`

The “GSL 2.7.1” has one more function named “`gsl_multifit_fsolver_driver`”.

For what is available in ROOT, see, e.g.:

- [ROOT Manual → Functional parts → Mathematical libraries → Minimization libraries and classes](https://root.cern/manual/math/#minimization-libraries-and-classes)

- [MathCore/MathMore → Numerical Algorithms → One-dimensional Minimization](https://root.cern/doc/master/group__Min1D.html)

- [MathCore/MathMore → Numerical Algorithms → Multi-dimensional Minimization](https://root.cern/doc/master/group__MultiMin.html)

- [`${ROOTSYS}/tutorials/fit`](https://root.cern/doc/master/group __tutorial__ fit.html)

- [`${ROOTSYS}/tutorials/roofit`](https://root.cern/doc/master/group __tutorial__ roofit.html) and [`${ROOTSYS}/tutorials/roostats`](https://root.cern/doc/master/group __tutorial__ roostats.html)

You can try the “`GSLMultiFit`” with [the `combinedFit2.C` macro](https://root-forum.cern.ch/t/gradient-calculation-in-gslmultifit/11483/5) and/or the [`${ROOTSYS}/tutorials/fit/NumericalMinimization.C`](https://root.cern/doc/master/NumericalMinimization_8C.html) macro.

UPDATE: @moneta Out of these two “tutorials” mentioned above, [the `combinedFit2.C` macro](https://root-forum.cern.ch/t/gradient-calculation-in-gslmultifit/11483/5) breaks with ROOT 6.28 (it’s fine with older releases) and the [`${ROOTSYS}/tutorials/fit/NumericalMinimization.C`](https://root.cern/doc/master/NumericalMinimization_8C.html) macro dies with any version (when the “`GSLMultiFit`” is tried).

---

_[View the full topic](https://root-forum.cern.ch/t/new-to-root-hoping-it-has-a-solution-to-my-problem-tried-to-fit-a-curve-using-gsl/54064)._
