ODE45 can solve Implicit function ?
15 views (last 30 days)
Kartik Saxena on 8 Dec 2023
The system of equations you've provided appears to involve both ordinary differential equations (ODEs) and differential-algebraic equations (DAEs). The presence of 'dP/dt' and 'd(Pb)/dt' on the right-hand side of their own derivatives suggests that there are algebraic constraints in your system.
MATLAB's 'ode45' solver is designed for solving explicit ODEs where all derivatives are given directly as functions of 't' and the state variables. It cannot directly handle equations where the derivatives are implicit functions of themselves, as is the case with your 'dP/dt' and 'd(Pb)/dt' equations.
For such systems, you can use 'ode15i', which is designed to handle implicit differential equations and DAEs. The 'ode15i' solver requires you to provide a function that computes the residuals of your differential equations for given values of 't', the state variables, and their derivatives.
You can refer to the following MathWorks documentation link for more information about 'ode15i':
I hope this resolves your issue.