newtons method to solve this eqs.

c1=500+(5.3*p1)+(0.004*p1^2);
c2=400+(5.5*p2)+(0.006*p2^2);
c3=200+(5.8*p3)+(0.009*p3^2);
condition ,
p1+p2+p3=800
lambda=8.5
p1,p2,p3???

2 comentarios

James Tursa
James Tursa el 25 de Oct. de 2013
What have you done so far?
student
student el 25 de Oct. de 2013
basics

Iniciar sesión para comentar.

 Respuesta aceptada

student
student el 16 de Nov. de 2013

0 votos

clear; clc; format long; %syms p1 p2 p3 c1 c2 c3 p1i p2i p3i dc1 dc2 dc3 Pd=input('Total power delivered is:'); p1i=input('enter initial value of p1i :'); p2i=input('enter initial value of p2i :'); p3i=input('enter initial value of p3i :'); if(p1i+p2i+p3i==Pd) disp('initially Lambda is assumed to be zero')
c1=500+(5.3*p1i)+(0.004*p1i^2); c2=400+(5.5*p2i)+(0.006*p2i^2); c3=200+(5.8*p3i)+(0.009*p3i^2); disp('Differentiating c1,c2,c3:'); dc1=5.3+(0.08*p1i) dc2=5.5+(0.012*p2i) dc3=5.8+(0.018*p3i) disp('Substituting values of p1,p2,p3 in differentiated equations :') Sd1=(c1/dc1) Sd2=(c2/dc2) Sd3=(c3/dc3) Lambda=(800+(5.3/0.008)+(5.5/0.012)+(5.8/0.018))/((1/0.008)+(1/0.012)+(1/0.018)) p1=p1i-Sd1 p2=p2i-Sd2 p3=p3i-Sd3 disp('The X vector gives the value of p1,p2,p3,lambda:');
else disp('Total power deliverd & sum of pi1,pi2,pi3 is not equal'); disp('Please run the program again'); end

Más respuestas (0)

Etiquetas

Preguntada:

el 25 de Oct. de 2013

Comentada:

el 16 de Nov. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by