Unable to solve the collocation equations -- a singular Jacobian encountered
    3 views (last 30 days)
  
       Show older comments
    
b1 = 0.1; b2 = 0.01; A = 0.1; L = 1; b = 0.3; M = 1; R = 2; E = 1; Pr = 2; N = 2; rho = 1; a1 = 1; Ec = 10; G = 1;
BC = @(ya,yb)[ya(1)-R; ya([2;7])-1;  yb([1;2;7;9]); yb(5)+ yb(1); yb(6)-E;]; 
ODE = @(x,y) [y(2);  y(3);  exp(b1*y(7))*(-L*b*y(4)*(y(4)-y(2))+M*y(2)+y(2)^2-y(1)*y(3)+A*(y(2)+(x/2)*y(3)))+b1*y(8)*y(3);
    (b*(y(2)-y(4))-y(4)^2-A*y(4))/(y(5)+A.*(x/2));                   (b*(y(2)+y(5))-A*y(5))/(y(5)+A.*(x/2));  
    -(y(6)*(y(4)+(b*(y(2)+y(5))-A*y(5))/(y(5)+A.*(x/2))))/y(5);      y(8);   
    (2*y(2)*y(7)-y(1)*b2*y(8)+(A/2)*(4*y(7)+x*y(8))-(N/rho)*(a1*(y(9)-y(7))+b*Ec*(y(4)-y(1))^2))/(1+b2*y(7));
    (a1*G*(y(7)-y(9))-2*(A+y(4))*y(9)-(A.*x/2)*y(8))/y(5);];
xa = 0; xb = 6; x = linspace(xa,xb,100);solinit = bvpinit(x,[R 1 1 0 1 0 1 1 E]);
sol = bvp5c(ODE,BC,solinit);  S = deval(sol,x);
figure(2),plot(x,S(2,:),'Linewidth',1.5);xlabel('\bf\eta');ylabel('\bff^\prime(\eta)');hold on
%%  when I run this code ERROR comes
2 Comments
  John D'Errico
      
      
 on 23 Oct 2020
				
      Edited: John D'Errico
      
      
 on 23 Oct 2020
  
			Don't add answers asking people to look at your question. If someone wants to answer your question, they will.
And if you want to make a comment, use a comment.
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!