Best way to solve this non-linear equation?
3 次查看(过去 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!