Andiguys

100 Reputation

5 Badges

1 years, 251 days

MaplePrimes Activity


These are questions asked by Andiguys

I would like to express the decision variables Pn_W,w_W,Ce_W,i1_W,Pn_D,w_D,Ce_D...other variables...​ in a compact form. Since their analytical expressions are lengthy, I want to identify terms and define appropriate composite parameters to simplify their representation.

Q_shorten_1.mw

For example ,  Suppose the original expression is: q := ((Cn - a)^2 + (P - d - b)*x^2 + Cn - a - b)/y(Cn - a)^2

Lets say Cn - a =X , P - d - b =S

Then the expression can be rewritten as: q = (X^2 + S*x^2 + X - b)/yX^2

I’m having trouble solving this. Any suggestions would be helpful.

NULL

restart

``

with(Optimization); with(plots); with(Student[VectorCalculus]); with(LinearAlgebra)

``

ineq := simplify((Cr*rho0*t*(Cr*alpha*b-alpha-1)*d^2+((alpha*((-g*i2+a)*Cr+2*Crm+2*c+3*t-2*Pr)*Cr*b+((g*i2-a)*Cr-2*Crm-2*c-2*t+2*Pr)*alpha+(g*i2-a)*Cr-2*t)*rho0+(2*(Cr*b-1))*(sigma*t+Cn-Pr+delta-1))*d+(alpha*((-g*i2+a)*Cr+2*Crm+2*c+2*t-2*Pr)*b+2*g*i2-2*a)*rho0+2*b*(sigma*t+Cn-Pr+delta-1))^2 > (((alpha*Cr*((-g*i2+a)*Cr+2*Crm+2*c-2*Pr)*b+((g*i2-a)*Cr-2*Crm-2*c+2*Pr)*alpha-(-g*i2+a)*Cr)*rho0+(2*(Cr*b-1))*(delta+Cn-Pr-1))*d+(alpha*((-g*i2+a)*Cr+2*Crm+2*c-2*Pr)*b+2*g*i2-2*a)*rho0+2*b*(delta+Cn-Pr-1))^2)

(((alpha*Cr*((-g*i2+a)*Cr+2*Crm+2*c-2*Pr)*b+((g*i2-a)*Cr-2*Crm-2*c+2*Pr)*alpha-(-g*i2+a)*Cr)*rho0+2*(Cr*b-1)*(delta+Cn-Pr-1))*d+(alpha*((-g*i2+a)*Cr+2*Crm+2*c-2*Pr)*b+2*g*i2-2*a)*rho0+2*b*(delta+Cn-Pr-1))^2 < (Cr*rho0*t*(Cr*alpha*b-alpha-1)*d^2+((alpha*((-g*i2+a)*Cr+2*Crm+2*c+3*t-2*Pr)*Cr*b+((g*i2-a)*Cr-2*Crm-2*c-2*t+2*Pr)*alpha+(g*i2-a)*Cr-2*t)*rho0+2*(Cr*b-1)*(sigma*t+Cn-Pr+delta-1))*d+(alpha*((-g*i2+a)*Cr+2*Crm+2*c+2*t-2*Pr)*b+2*g*i2-2*a)*rho0+2*b*(sigma*t+Cn-Pr+delta-1))^2

(1)

  

``extra := indets(ineq,And(name,Not(constant))) >~ 0;

{0 < Cn, 0 < Cr, 0 < Crm, 0 < Pr, 0 < a, 0 < alpha, 0 < b, 0 < c, 0 < d, 0 < delta, 0 < g, 0 < i2, 0 < rho0, 0 < sigma, 0 < t}

(2)

 

(solve({ineq}, t) assuming extra[]);

 

``

Download Q_solve.mw

I require the condition for equations  C1<C2<C4​, with all parameters strictly positive and subject to the constraint t > t1​.
I want to solve for the variables t and s. Specifically, what are the analytical conditions on t that ensure C2>C1​, and what are the analytical conditions on s that ensure C4 > C2 >C1​ ?

I attempted to solve this , but I keep encountering errors.
Q_solving_t_and_s.mw

In the plot shown below, one of the axes is not visible, and one of the lines inside the graph is also missing. Is there an error in the plotting syntax that is causing this issue? Could anyone please identify the mistake and suggest how to correct it

All_plots_Question.mw

Suppose I am plotting a 2D plot and want to highlight the point where two lines intersect. I would like to display this intersection point inside the plot in black font, mark it with an arrow or some visual highlight, and clearly label it. How can I do this?

Additionally, instead of using different colours (blue, green, red) for the lines, I want to distinguish them using different line styles such as solid, dotted, and long-dashed lines. How can I make these changes?

restart

with(Optimization); with(plots); with(Student[VectorCalculus]); with(LinearAlgebra)

 

_local(Pi)

Pi

(1)
 

M_w := b*(((Cr*alpha*((-g*i2+a)*Cr+2*Crm+2*c-2*Pr)*b+((g*i2-a)*Cr-2*Crm-2*c+2*Pr)*alpha-(-g*i2+a)*Cr)*d+alpha*((-g*i2+a)*Cr+2*Crm+2*c-2*Pr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(delta-1))*d+8*rho0^2*b*alpha)*((Cr*b-1)*d+b)^2)

(3)

M_S := ((t*Cr*(Cr*alpha*b-alpha-1)*d^2+(Cr*((-g*i2+a)*Cr-2*Pr+2*Crm+2*c-2*s+3*t)*alpha*b+((g*i2-a)*Cr+2*Pr-2*Crm-2*c+2*s-2*t)*alpha+(g*i2-a)*Cr-2*t)*d+((-g*i2+a)*Cr-2*Pr+2*Crm+2*c-2*s+2*t)*alpha*b+2*g*i2-2*a)*rho0-(2*(-sigma*t-Cn+Pr-delta+1))*((Cr*b-1)*d+b))^2*b*d/((8*(((Cr*alpha*b-alpha+1)*d+alpha*b)*rho0^2-2*b*d*(delta-1)))*(Cr*b*d+b-d)^2)

((t*Cr*(Cr*alpha*b-alpha-1)*d^2+(Cr*((-g*i2+a)*Cr+2*Crm+2*c-2*Pr-2*s+3*t)*alpha*b+((g*i2-a)*Cr-2*Crm-2*c+2*Pr+2*s-2*t)*alpha+(g*i2-a)*Cr-2*t)*d+((-g*i2+a)*Cr+2*Crm+2*c-2*Pr-2*s+2*t)*alpha*b+2*g*i2-2*a)*rho0-(-2*sigma*t-2*Cn+2*Pr-2*delta+2)*((Cr*b-1)*d+b))^2*b*d/((8*((Cr*alpha*b-alpha+1)*d+alpha*b)*rho0^2-16*b*d*(delta-1))*(Cr*b*d+b-d)^2)

(4)
 

``

DATA1 := [delta = .9, a = 0.1e-1, g = .25, c = 0.5e-1, rho0 = .4, Cn = .4, Crm = .1, i2 = 0.6e-1, t = 0.1e-1, alpha = .95, s = 0.1e-1, Pr = .35, upsilon = .95, b = .5, d = .3, Cr = 0.1e-1]

[delta = .9, a = 0.1e-1, g = .25, c = 0.5e-1, rho0 = .4, Cn = .4, Crm = .1, i2 = 0.6e-1, t = 0.1e-1, alpha = .95, s = 0.1e-1, Pr = .35, upsilon = .95, b = .5, d = .3, Cr = 0.1e-1]

(5)

P11 := subs(DATA1, M_w); P21 := subs(DATA1, M_D); P31 := subs(DATA1, M_S)

0.9301486586e-2

 

4.251178959*(-0.4764573140e-1+0.4030e-2*sigma)^2

 

4.251178959*(-0.4917713136e-1+0.4030e-2*sigma)^2

(6)

``

A1 := plot([P11, P21, P31], sigma = 0 .. .7, color = ["Red", "Blue", "Green"], labels = [sigma, `&pi;__m`], labeldirections = ["horizontal", "vertical"], legend = [`#msubsup(mi("&pi;"),mi("n"),mn("W"));`, `#msubsup(mi("&pi;"),mi("n"),mn("D"));`, `#msubsup(mi("&pi;"),mi("n"),mn("DS"));`], axis[2] = [color = "#600000"])

 
 

display(A1, pointplot([[X, Y]], symbol = circle, symbolsize = 25, color = blue))

Error, (in plots:-pointplot) points cannot be converted to floating-point values

 
 

NULL

Download Manf_profit__t_graph_changes_needed.mw

1 2 3 4 5 6 7 Last Page 1 of 11