Unable to reduce to square system because the number of equations differs from the number of indeterminates.

10 次查看(过去 30 天)
Hi everyone, I am trying to solve two second order differential equations with two unknowns. However, matlab gives the warning that: " Warning: Number of equations greater than number of indeterminates. Trying heuristics to reduce to square system. > In symengine In mupadengine/evalin (line 123) In mupadengine/feval (line 182) In dsolve>mupadDsolve (line 340) In dsolve (line 194) In ExampleOfdsolve (line 31) "
Then it later gives an error that:
" Error using mupadengine/feval (line 187) Unable to reduce to square system because the number of equations differs from the number of indeterminates.
Error in dsolve>mupadDsolve (line 340) T = feval(symengine,'symobj::dsolve',sys,x,options);
Error in dsolve (line 194) sol = mupadDsolve(args, options);
Error in ExampleOfdsolve (line 31) [aSol(x), bSol(x)] = dsolve(odes,bc)".
What can I do? Please see the code below and on the attachment:
syms A B C E F G H I J K N O P a(x) b(x)
%% Parameters A = 3.22e-9; B = 2.13e-9; C = 1.28e-9; E = 1.66e-8; F = 8.06e-9; G = 8.14e-5; H = 149; I = A/G; J = 6.24; K = 5.68e-8; N = 84.86; O = 0.63; P = 5.3e-8;
ode1 = A * diff(a,x,2) + B O * J * diff(((b)/(b^2 + J * b + J * K)),x,2) + C *O * J * K diff(((1)/(b^2 + J * b + J * K)),x,2) == 0; ode2 = E * diff(b,x,2) - B * O * J * diff(((b)/(b^2 + J * b + J * K)),x,2) - 2 * C O * J * K diff(((1)/(b^2 + J * b + J * K)),x,2)- F * P* diff((1/b),x,2) ==0;
odes = [ode1; ode2];
%%Boundary conditions bc1 = a(0) == (H*N); bc2 = E * diff(b,x) - B * diff(((O * J * b)/(b.^2 + J * b + J * K)),x) - 2 * C * diff(((O * J * K)/(b.^2 + J * b + J * K)),x)- F * diff((P/b),x) ==0; bc3 = a(I) == ((O * b.^2)/(b.^2 + J * b + J * K)); bc4 = b(I)== 2.24e-4; bc = [bc1; bc2; bc3; bc4];
[aSol(x), bSol(x)] = dsolve(odes,bc)
fplot(aSol) hold on fplot(bSol)
legend('SO_2','H^+','Location','best')

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by