ODE symbolic Boundary conditions in respect to another variable
Mostra commenti meno recenti
Hello,
I have an ODE with three boundary conditions to solve (see code bellow). Having run this code as a .mlx file I see that cond2 is read as:
it takes the derivative in respects to a not r. I wanted to produce such a limit:
I tried changing the condition to:
cond2 = Dw(r==a) == 0
or
cond2 = Dw(r=a) == 0
but it did not do the trick. Could you please tell me how to properly input the boudary condition in respect to r?
Thank you,
Bellow is my code:
clear; clc;
syms a P G t nu F Q r D w(r) h
% Forces
F = - pi * a^2 * P;
Q = (pi*r^2*P) / (2*pi*r);
% ODE
ode = diff(((1/r)*diff((r*diff(w,r)),r)),r) == Q/D;
Dw = diff(w,r);
cond1 = Dw(0) == 0;
cond2 = Dw(a) == 0
cond3 = w(a) == 0;
conds = [cond1 cond2 cond3];
wSol(r) = dsolve(ode,conds);
w_0 = subs(wSol,r,0);
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Symbolic Math Toolbox in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
