Solving ODE with sqrt
1 回表示 (過去 30 日間)
古いコメントを表示
I tried to solve an ODE with a square root, but didn't manage. Can someone help me? This is the ODE: ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/757964/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/757964/image.png)
0 件のコメント
回答 (2 件)
J Chen
2021 年 10 月 4 日
If you know how to solve an ODE in Matab, the problem might be negative values for the sqrt().
0 件のコメント
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)))
eqn = lhs == rhs
sol = simplify(dsolve(eqn))
size(sol)
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.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Ordinary Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!