how to solve the nonlinear equatios?
1 view (last 30 days)
Show older comments
syms T v
p=30;a=7;d=1;lamda=0.8;c=10;r=35;h=0.05;w=200;k=0.02;b=7;
M=k*a;
%eqn1=(1/T)*(p*d-((lamda*p*d*v)/T)-(d*exp(-(w-k)*v)-(d*v/T))*c-d*((v/T)-1)*r-(d/(w-k))*(1-exp(-(w-k)*v)*h)))==0'
%eqn2=((1/T)*(-(d*c*v*exp(-(w-k)*v)*M/(w-k))+(((d*c*(1-exp(-(w-k)*v))+h*d*v*(1+exp(-(w-k)*v)))*M)/(w-k)^2)+((2*h*d*(exp(-(w-k)*v)-1)*M)/(w-k)^3)-1))== 0
eqns = solve('((1/T)*(p*d-((lamda*p*d*v)/T)-(d*exp(-(w-k)*v)-(d*v/T))*c-d*((v/T)-1)*r-(d/(w-k))*(1-exp(-(w-k)*v)*h)))==0','((1/T)*(-(d*c*v*exp(-(w-k)*v)*M/(w-k))+(((d*c*(1-exp(-(w-k)*v))+h*d*v*(1+exp(-(w-k)*v)))*M)/(w-k)^2)+((2*h*d*(exp(-(w-k)*v)-1)*M)/(w-k)^3)-1))== 0');
solve(eqns,T,v)
4 Comments
Answers (1)
KSSV
on 2 Jan 2020
Try this.
syms v T
p=30;d=1;lamda=0.8;c=10;r=35;h=0.05;chi=200;k=0.02;b=7;a =0.01;
w = k*(1-exp(-a*chi));
M=k*a;
equation1=(1/T)*[(p*d-((lamda*p*d*v)/T)-(d*exp(-(w-k)*v)-(d*v/T))*c-d*((v/T)-1)*r-(d/(w-k))*(1-exp(-(w-k)*v)*h))]==0 ;
equation2=(1/T)*[-(d*c*v*exp(-(w-k)*v)*M/(w-k))+(((d*c*(1-exp(-(w-k)*v))+h*d*v*(1+exp(-(w-k)*v)))*M)/(w-k)^2)+((2*h*d*(exp(-(w-k)*v)-1)*M)/(w-k)^3)-1]== 0 ;
eqns = [equation1, equation2] ;
S = solve(eqns,[ T v]) ;
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!