New answers tagged

2

Curve fitting can be very sensitive to your initial guess for each parameter. Because you don't specify a guess in your code, all of these parameters start with a value of 1. Comparing with the converged results for the t fitting, while t is actually pretty close to 1, the other parameters are much further away. Its mostly just luck that the t value didn't ...


1

Ok, so first, you have a problem: when $s=0$ both $x(0) = 0$ and $\sin\Phi(0) = \sin(0) = 0$. To figure out how to deal with this, try to extend the function $$\frac{\sin\Phi(s)}{x(s)}$$ continuously for $s = 0$. That means calculate the limit $$L = \lim_{s \to 0} \, \frac{\sin\Phi(s)}{x(s)}$$ The limit exists, because roughly speaking, the numerator is ...


2

From what I can tell this is an initial value ODE problem, so you should be able to use solve_ivp. This handles vector equations just fine. I'm not sure exactly how stiff your problem is, so using the defaults for most of the settings should be fine, and you can adjust these if you find the numerical solution isn't satisfactory. There is one slightly ...


Top 50 recent answers are included