Solving ODE with sqrt

2 次查看(过去 30 天)
Bart van Dijk
Bart van Dijk 2021-10-4
I tried to solve an ODE with a square root, but didn't manage. Can someone help me? This is the ODE:

回答(2 个)

J Chen
J Chen 2021-10-4
If you know how to solve an ODE in Matab, the problem might be negative values for the sqrt().

Walter Roberson
Walter Roberson 2021-10-4
syms rho g h3 delta p A1 A2
syms h1(t)
lhs = diff(h1);
rhs = sqrt(2 * (rho * g * (h3 - h1) - delta*p)/(rho * (1-(A1/A2)^2)))
rhs(t) = 
eqn = lhs == rhs
eqn(t) = 
sol = simplify(dsolve(eqn))
sol = 
size(sol)
ans = 1×2
2 1
So assuming that none of the variables are implicit functions (such as h3 looks like it might be...), then there are two solutions. One of the two appears to include a boundary condition, but the other does not appear to include a boundary condition, which is a bit puzzling.

类别

Help CenterFile Exchange 中查找有关 Ordinary Differential Equations 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by