Best way to solve this non-linear equation?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
John D'Errico
el 26 de Nov. de 2022
Editada: John D'Errico
el 26 de Nov. de 2022
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 comentarios
Torsten
el 26 de Nov. de 2022
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.
Ver también
Categorías
Más información sobre Calculus en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!