How to solve these differential equations? - matlab

I am working on a heat exchanger and found these differential equations from a paper. I never had such equation as you can see even if it's a single order differential equation a term "dy" is always hanging at right side of the equation.
I am trying to solve them in matlab but due to dy, I am not able to put it into an equation.
Can anyone help me to simplify the equation or any help on how such type of equations can be solved in matlab?
These are the equations:

Look at Eqs (23) and (24). They specify the definitions of \dot{m}_p and \dot{m}_s so that when you plug them into Eqs (19) and (20) they lose the floating differentials.

Related

how to understand the gradient vector flow formula?

Currently, I am learning gradient vector flow. I have one question about the calculation.
After Euler equations, the GVF can be found by solving the following formula:
Then, the paper said: "Equations (8) and (9) can be solved numerically by treating u and v as a function of time." The resulting equations are:
I have no idea how to obtain equation (10) from equation (8). Any suggestion is appreciated~~~

How to solve or approximately solvea differential equation with a integral item in matlab

I want to solve the equation group like
\frac{dx_1(t)}{dt}&=(1-\int_0^t x_1(t) dt)x_2+x_1;
\frac{dx_2(t)}{dt}&=(1-\int_0^t x_2(t) dt)x_1+x_2.
Can I directly use the methods in Matlab to solve this problem? I tried ode45 but failed.

How to solve differential equation in matlab

How can I show that y(t)=Yo/Yo+(1-Yo)e^-at is the solution of the differential equation dy/dt=ay(1-y) using MATLAB. What function should I use?
if you want to simulate the results use the ode's family
https://www.mathworks.com/help/matlab/ref/ode45.html
else you can define your equation in syms and use diff
https://www.mathworks.com/help/symbolic/diff.html
other wise you can solve it numerically

MATLAB solve ODE on invariant manifold

I have a system that looks like
dn/dt=f(n,v)
dh/dt=g(h,v)
I want to solve this equation on the manifold F(v,n,h)=0, a nonlinear function in v. I tried to use something like v=fzero(#(x) F(x,n,h),0) to solve for the value of v on the manifold at each time step. But this is incredibly slow and ode15s (my system is a relaxation oscillator) fails to meet integration tolerance. How do I find solution to the ODE on the manifold defined by F(v,n,h)=0?
I find #LutzL's comment very helpful. It is possible to set up a DAE solver using ode15s.
Example: The "Solve Robertson Problem as Semi-Explicit Differential Algebraic Equations (DAEs)" section in https://www.mathworks.com/help/matlab/ref/ode15s.html
In my case, I would setup a matrix:
M=[zeros(1,3);0,1,0;0,0,1];
options = odeset('Mass',M,'RelTol',1e-5,'AbsTol',1e-6,'MaxStep',0.01);
y0=[v0,n0,h0];
[T,Y]=ode15s(#slow,[0 50],y0,options);
And slow is a function defined as:
function dy = slow(t,y)
v=y(1); n=y(2); h=y(3);
dy=zeros(3,1);
dy(1)=F(v,n,h);
dy(2)=f(n,v);
dy(3)=g(h,v);
end
One of the possible ways to solve this problem is to differentiate
the F(v,n,h)=0 equation:
Now we can obtain the ODE system
or
which can be solved in the usual way.

there is something wrong with nonlinear differential equation. the result is very large. i want to solve it by numerical methods

I want to solve a nonlinear differential equation and I have tried many methods, such as ode45,ode15s, but failed. Could you please give me a help. The equation is
x''+0.01x'+x+2(x'-0.55x)^3=sin(0.1t)% (I will expand it in my program).
I have wrote the ode method in Matlab, please have a look.
%system governing function
function xdot=ForcedOscillator1(t,x,dummy,zeta,a,b,c,d,Omega,Xo)
xdot=[x(2);-zeta*x(2)-x(1)-a*x(2)^3-b*x(2)^2*x(1)-c*x(2)*x(1)^2-d*x(1)^3+Xo*sin(Omega*t)];
%ode program
clear all
clc
zeta=0.01;
a=2;
b=-3.3;
c=1.815;
d=-0.3328;
Omega=0.1; Xo=1;
tspan=[0 100]
options=odeset('RelTol',1e-8,'AbsTol',[1e-8 1e-8]);
for m=1:1
[t,x]=ode15s('ForcedOscillator1',tspan,[0 0]',options,zeta,a(m),b(m),c(m),d (m),Omega,Xo);
plot(t,zeta.*x(:,2)+x(:,1)+a.*x(:,2).^3+b.*x(:,2).^2.*x(:,1)+c.*x(:,2).*x(:,1).^2+d.*x(:,1).^3);
grid on
xlabel('t(s)');
ylabel('F_t(N)');
title('Response of a nonlinear system');
hold on
end
As you can see, when I run this file, the output will be extraordinarily large, it will reach about 10^49. I think it must be something wrong in my program or the system is unstable.
could you please help solve this question in the numerical methods. Or prove this equation is unstable.
your system is just unstable...
If you need proof, I suggest finding good ode textbook