# Problem with solve

I need to solve this function, but I cannot copy mathematical function, so I display in picture, sorry

u=(y0-μ)/(σ+r);
v=(y0-μ)/(σ-r);
a=PDF[NormalDistribution[μ,σ],u];
b=PDF[NormalDistribution[μ,σ],v];
q=CDF[NormalDistribution[μ,σ],u]-CDF[NormalDistribution[μ,σ],v];
μt=μ+σ/q(b-a);
σt=σ^2(1+1/q(v*b-u*a)-1/q^2(b-a)^2);
L=k((μt-y0)^2+σt^2);
Cpm=r*σ/(3 Sqrt[σ^2+(μ-y0)^2]);
TC=L+(1-q)SC+IC+Exp[1-Abs[1-μ/y0]]MC+(Exp[(σ1-σ)/(σ1-σ2)]-1)DC;
g=4/3<=Cpm<=5/3;
h=D[TC,{σ,μ}];
Solve[h==0,g,{σ,μ}]

• You certainly can copy and paste code rather than post images and you should do so. Copy the code as Input Text, an option that is available from the Edit > Copy As submenu. – m_goldberg Apr 15 at 3:11
• oke I'll try, thankyou – Maghfira Apr 15 at 4:31
• D[TC,{σ,μ}] in the help pages shows you want mu to be the degree of differentiation. I doubt that is what you want. I imagine you want D[TC,σ,μ] to differentiate first by sigma and then by mu. Solve is usually for polynomials. Reduce[{h==0,g},{σ,μ}] might be better. But there are still problems trying to make this a simple enough problem to find solutions. Please check this carefully to make certain there are no errors. – Bill Apr 15 at 6:17

It's easier to differentiate if you define TC with RealAbs instead of Abs:

TC = L + (1-q) SC + IC + Exp[1-RealAbs[1-μ/y0]] MC + (Exp[(σ1-σ)/(σ1-σ2)]-1) DC;


Then, if you want to set both of the derivatives with respect to $$\sigma$$ and $$\mu$$ to zero, try

h = D[TC, {{σ, μ}}];
Solve[Thread[h == 0], {σ, μ}]


It's taking a long time to generate results though.

• What if I need to solve based on differentiating sigma, mu and Cpm? @Roman – Maghfira Apr 18 at 4:28
• Solve[Thread[D[TC, {{σ, μ, Cpm}}]; == 0], {σ, μ, Cpm}] – Roman Apr 18 at 6:34