Best way to solve this non-linear equation?
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a set of equations I need to solve, the first equation (not the one shown below) is a PDE solved through pdepe(), but for the form of the following equation I am not sure which approach to take to solve it:
I have tried solving it symbolically through solve() and dsolve(), but that did not work, with solve() returning an empty sym and dsolve returning the following:
syms a(t) c(x) d(x)
b = 2*10^(-7);
eqn = diff(a,t) == -b*(diff(c,x)*diff((d/c),x) + rho_a*diff((d/c),2,x));
sol = dsolve(eqn,a);
Error using mupadengine/feval_internal
No differential equations found. Specify differential equations by using symbolic functions.
Error in dsolve>mupadDsolve (line 334)
T = feval_internal(symengine,'symobj::dsolve',sys,x,options);
Error in dsolve (line 203)
sol = mupadDsolve(args, options);
Error in odetest (line 6)
sol = dsolve(eqn,a);
댓글 수: 0
답변 (1개)
John D'Errico
2022년 11월 26일
편집: John D'Errico
2022년 11월 26일
dsolve is not used to solve a PDE. It applies ONLY to an ODE or a system of ODEs.
help dsolve
There are no symbolic solvers in MATLAB that apply to a PDE. Sorry. In SOME (moderately rare, and usually pretty simple) cases, an analytical solution can be found. For example, sometimes, separation of variables can be used to derive a solution.
As it is though, you ask for the best way to solve the PDE. That would be by the use of PDEPE (which you claim to have already done) or similar tools. Or you could write your own code, using a variety of methods for the numerical solution of a PDE.
댓글 수: 5
Torsten
2022년 11월 26일
This system cannot be solved by a standard MATLAB solver (e.g. pdepe).
You will have to discretize on your own in space and solve the resulting system of ordinary differential equations using ODE15S, e.g.
Look up "method-of-lines" for more details.
참고 항목
카테고리
Help Center 및 File Exchange에서 Calculus에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!