1
$\begingroup$

I am trying to find an analytic/numeric solution for a set of equations involving functions, summation, and complex quantities.

Definitions:

step = 1;
num = 15;
rho = Range[step , num, step];
theta = Most[Range[0, 2 Pi, 2 Pi/10]];
area[l_] := \[Pi] (2 step l - step^2) 1/Length[theta]

(I choose functions below arbitarily)

K11[a_, b_] := I a + a b + a Cos[b]
K12[a_, b_] := Conjugate[K11[a, b]]
K21[a_, b_] := (I a + a Sin[b])^2 + a Cos[(2 b)/3]
K22[a_, b_] := Conjugate[K21[a, b]]
C1[a_, b_] := K11[a, b] - K12[a, b]

Equations:

eq1 = -a1 + I Sum[  Conjugate[ (r1[\[Rho], \[Theta]] K11[\[Rho], \[Theta]] + r2[\[Rho], \[Theta]] K12[\[Rho], \[Theta]])] area[\[Rho]], {\[Rho], rho}, {\[Theta], theta}];
eq2 = -a2 +  I Sum[  Conjugate[ (r1[\[Rho], \[Theta]] K21[\[Rho], \[Theta]] + r2[\[Rho], \[Theta]] K22[\[Rho], \[Theta]])] area[\[Rho]], {\[Rho], rho}, {\[Theta], theta}];
eq3 = -4 Im[r1[\[Rho], \[Theta]] (K11[\[Rho], \[Theta]] a1 + K21[\[Rho], \[Theta]] a2)] -  C1[\[Rho], \[Theta]] (n1[\[Rho], \[Theta]] + 1) + C2 (1 - n1[\[Rho], \[Theta]]) (*C2 is a parameter*);
eq4 = -4 Im[ r2[\[Rho], \[Theta]] (K12[\[Rho], \[Theta]] a1 + K22[\[Rho], \[Theta]] a2)] - C1[\[Rho], \[Theta]] (n2[\[Rho], \[Theta]] + 1) + 0 (1 - n2[\[Rho], \[Theta]]) ;
eq5 = -1 r1[\[Rho], \[Theta]] + I n1[\[Rho], \[Theta]] Conjugate [(K11[\[Rho], \[Theta]] a1 +  K21[\[Rho], \[Theta]] a2)] ;
eq6 = -1 r2[\[Rho], \[Theta]] + I n2[\[Rho], \[Theta]] Conjugate [(K12[\[Rho], \[Theta]] a1 + K22[\[Rho], \[Theta]] a2)] ;

Condition and variables:

eqn={eq1==0,eq2==0,eq3==0,eq4==0,eq5==0,eq6==0}

Var= {a1,a2,r1,r2,n1,n2}

Problem:

Here, I want to plot a graph between (a1^2 vs C2). For that, I need to get analytic or numeric solution of the variables most of which are the functions of position and angle as given above. I couldn't deal using elimination method and solve feature.

Any help is appreciated.Thank you

$\endgroup$
  • 1
    $\begingroup$ Do you have a function for area? That seems unspecified. $\endgroup$ – Kevin Ausman May 3 at 1:32
  • $\begingroup$ @Kevin Ausman Hi Kevin, Sorry I missed it. I have updated the post. Thanks. $\endgroup$ – maeinss May 3 at 2:11
  • $\begingroup$ Perhaps I don't understand. You want to solve for six variables, but r1,r2,n1,n2 are written in your code as functions. If I remove the [\[Rho], \[Theta]] that follows each of your r1,r2,n1,n2 in your code then Simplify[Reduce[{eq1==0, eq2==0,eq3==0,eq4==0,eq5==0,eq6==0},var]] seems to work for me. The result is still large and complicated with some Conjugate remaining, but perhaps giving it a little more information about your variables might let it get rid of some of that. Is anything in this helpful? $\endgroup$ – Bill May 3 at 2:54
  • $\begingroup$ @bill Thanks bill, my first idea was to remove all rho and theta dependencies and reduce/solve it as you suggested. However, it didn't work(says cannot be solved with the method available). Summation in the first two equation increases complexity i guess. $\endgroup$ – maeinss May 3 at 3:14
  • $\begingroup$ I had all this working an hour ago and now it doesn't work anymore. Now I see you have trailing ==0 for eq3,4,5,6 but you then later do eqn={...eq3==0,eq4==0,eq5==0,eq6==0} so that gives you eq3==0==0 etc. That may just be a posting typo. I don't know if that is the real problem. But I don't see any reason that Reduce shouldn't be able to solve this $\endgroup$ – Bill May 3 at 3:51
1
$\begingroup$

I didn't save the working version I had, but perhaps this will help.

step=1;
num=15;
rho=Range[step , num, step];
theta=Most[Range[0,2 Pi,2 Pi/10]];
area[l_]:=Pi(2 step l-step^2)/Length[theta];
K11[a_,b_]:=I a+a b+a Cos[b];
K12[a_,b_]:=Conjugate[K11[a,b]];
K21[a_,b_]:=(I a+a Sin[b])^2+a Cos[2 b/3];
K22[a_,b_]:=Conjugate[K21[a,b]];
C1[a_,b_]:=K11[a, b]-K12[a,b];
eq1=Simplify[-a1+I Sum[Conjugate[r1 K11[ρ,θ]+r2 K12[ρ,θ]]area[ρ],{ρ,rho},{θ,theta}]];
eq2=Simplify[-a2+I Sum[Conjugate[r1 K21[ρ,θ]+r2 K22[ρ,θ]]area[ρ],{ρ,rho},{θ,theta}]];
eq3= -4 Im[r1(K11[ρ,θ]a1+K21[ρ,θ]a2)]-C1[ρ,θ](n1+1)+C2(1-n1);
eq4= -4 Im[r2(K12[ρ,θ]a1+K22[ρ,θ]a2)]-C1[ρ,θ](n2+1)+0 (1-n2);
eq5= -1 r1+I n1 Conjugate[K11[ρ,θ]a1+K21[ρ,θ]a2];
eq6= -1 r2+I n2 Conjugate[K12[ρ,θ]a1+K22[ρ,θ]a2];
Var= {a1,a2,r1,r2,n1,n2};
Reduce[eq1==0&&eq2==0,Var]

You can then use Simplify and N on the output from Reduce to make the result much smaller and possibly see what you are looking for in that. The Simplify on eq1 and eq2 make those dramatically simpler because of your summation over regular angles.

I'm not certain if your complete system will solve or not, I didn't wait for that because as you mentioned, you were just making up arbitrary equations for each Knn.

I'm not certain what it is in the way you wrote the code and was provoking Reduce to say that it could not solve the system. I did see that warning once, but I didn't save the code at that point to try to track down the reason for that.

I'm not certain whether your r1,r2 are real radius or not. If they are and you tell Reduce that Element[r1|r2,Reals] then the code speeds up dramatically. Anything that you assume, but you don't tell Mathematica, then it will assume the worst case with everything as unknown complex, possibly zero, possibly infinite, possibly etc. Are ρ and θ real? If so then telling Mathematica that might make your problem much easier to solve.

So I'm not sure where to go, if anywhere, with this now. I can't even seem to get it to solve eq3 for C2. Can you at least reproduce what I've shown here? Can you try to track down what the source of the "Reduce can't solve" warning?

$\endgroup$
  • $\begingroup$ Thanks Bill, r1 and r2 are complex numbers in my case, However, n1 and n2 are reals. Also,ρ and θ are real. Yeah, I can reproduce to the point you did for eq1 and eq2, but when solving for 6 equations with 6 variables, I can't get the solution. "Reduce can't solve" warning isn't there but its keeps running. $\endgroup$ – maeinss May 3 at 19:15
  • $\begingroup$ Simplify[Reduce[eq1==0&&eq2==0&&eq3==0&&Element[n1|n2|ρ|θ,Reals],{a1,a2,r1,r2,n1,n2,C2}],Element[n1|n2|ρ|θ,Reals]] Beyond that I don't know what to say. $\endgroup$ – Bill May 3 at 19:58
  • $\begingroup$ @ Bill I will look for it. Thanks for your time and help Bill. $\endgroup$ – maeinss May 3 at 21:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.