Best way to solve this non-linear equation?
1 view (last 30 days)
Show older comments
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 Comments
Answers (1)
John D'Errico
on 26 Nov 2022
Edited: John D'Errico
on 26 Nov 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 Comments
Torsten
on 26 Nov 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.
See Also
Categories
Find more on Calculus 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!