# Tag Info

2

Your issue is that you are modifying y in your function. If you return, [u,v] instead of resetting the values in y, it seems to run just fine. I believe this is because the solver will store and use intermediate values elsewhere, but your function is having the side effect of altering these stored values.

7

As @WolfgangBangerth already commented, this is usually referred to as a differential algebraic equation (DAE). These have their own challenges and there are special numerical methods for them. In general, for a system of DAEs you might have fewer differential equations than unknowns, so the algebraic constraint(s) serve to close the system and identify a ...

1

You are trying to solve this matrix ODE system as: $$A \mathbf{x}^{'}(r) = -B \mathbf{x}(r)$$ where: $\mathbf{x}^{'}(r) = \frac{d \mathbf{x}}{dr}$. If $A$ is invertible: $$\mathbf{x}^{'}(r) = -A^{-1} B \mathbf{x}(r)$$ The general solution is: $$\mathbf{x}(r) = \sum_{i=1}^{n} c_{i} \exp{(\lambda_{i} r)} \mathbf{u}_{i}$$ Where $\lambda_{i}$ and \$\mathbf{...

Top 50 recent answers are included