0
$\begingroup$

I want to fit the gaussian function to power law function from the end of gaussian fitting curve to the peak of it,

ample = -1.05296;
x0 = -0.992208;
sigma = -0.513743;

ample*(1/(sigma*Sqrt[2*Pi]))*Exp[-(1/2)*(((x - x0)/sigma)^(2))]

FindFit[ample*(1/(sigma*Sqrt[2*Pi]))*
Exp[-(1/2)*(((x - x0)/sigma)^(2))], {a*(-x)^n, {a, n}, -3 <= 
x <= -1}, {a, n}, x];

How can i deal with it?

$\endgroup$
  • $\begingroup$ As an experiment you might try creating a Table of enough {x,y} points from your power law function, use Fit on those points with your gaussian as usual and then Plot both the power law and gaussian on the same graph to see if this is acceptable. Different experiment, Integrate[(power-gaussian)^2] over a suitable domain and see if you can Minimize that to get an acceptable solution. Can you see how and why you might do each of those? $\endgroup$ – Bill Apr 28 '19 at 17:26
  • 1
    $\begingroup$ Is Series[ ample*(... etc etc...), {x, -2, 2}] good enough? It produces a second-order polynomial approximation of your function around x=-2. $\endgroup$ – evanb Apr 28 '19 at 19:19
  • $\begingroup$ Thanks Bill and evanb, i`ll try! $\endgroup$ – Gwanwoo Apr 29 '19 at 1:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.