Solving ODE with sqrt
    5 views (last 30 days)
  
       Show older comments
    
I tried to solve an ODE with a square root, but didn't manage. Can someone help me? This is the ODE: 

0 Comments
Answers (2)
  J Chen
      
 on 4 Oct 2021
        If you know how to solve an ODE in Matab, the problem might be negative values for the sqrt().
0 Comments
  Walter Roberson
      
      
 on 4 Oct 2021
        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 Comments
See Also
Categories
				Find more on Ordinary Differential Equations in Help Center and File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




