Solve equation with First and Second type of Elliptical Integral?

Hi,

I am trying to solve elliptical equation that contain First and Second kind of elliptical. I did not get any result. I tried below steps

k = Simplify[[[4*R*r]/[[f - Y]^2 + [r + R]^2]]^1/2, Assumptions -> {r = 0.05, R = 0.3, f = 0.1, Y = 0.8}]
A = EllipticK[k]
B = EllipticE[k]
N = [R*r]^1/2/[2*Pi*k][[2 - k^2]*A - [2*B]] // FullSimplify

Thanks

Several syntax errors. N is a reserved symbol for numerical value. A and B should be defined as functions A[k_]:= , etc. [ ] cannot be used as grouping brackets; use ( ). [ ] reserved for function definitions. Here is corrected sample of part of your code:

In[16]:= A[k_] := EllipticK[k];
B[k_] := EllipticE[k];
(R*r)^1/2/(2*Pi*k) ((2 - k^2)*A[k] - 2*B[k]) // FullSimplify

Out[18]= -((r R (2 EllipticE[k] + (-2 + k^2) EllipticK[k]))/(
 4 k \[Pi]))

Hello,

Thank you so much for your reply. Please I have the value of r,R,f, and Y. and I define k as

k = Simplify[((4*R*r)/((f - Y)^2 + (r + R)^2))^1/2, Assumptions -> {r = 0.05, R = 0.3, f = 0.1, Y = 0.8}]

I want to get out of K(k) and E(k) in final result.

Thanks

Generally, rules are used with Mathematica to substitute numerical values into expressions containing symbols. Something like the following should work with the expression that you tried.

((4*R*r)/((f - Y)^2 + (r + R)^2))^1/2 /. {r -> 0.05, R -> 0.3, 
  f -> 0.1, Y -> 0.8}

Hello,

Thank you so much for your reply. Please I still got the result as function of E(K). How I can get it without E(k). In addition, In original equation I have k^2. How I can assign the result from first equation to be k for second, third, and forth equations?

((4*R*r)/((f - Y)^2 + (r + R)^2))^1/2 /. {r -> 0.05, R -> 0.3, f -> 0.1, Y -> 0.8}
A[k_] := EllipticK[k];
B[k_] := EllipticE[k];
(R*r)^1/2/(2*Pi*k) ((2 - k^2)*A[k] - 2*B[k]) // FullSimplify

Output

(r R (2 EllipticE[5] + 23 EllipticE[(4 r R)/((r + R)^2 + (-2 + Y)^2)][5]))/(20 \[Pi])

Rules are only applied using RelpaceAll[] for each individual expression, so the substitutions are not done globally. Also, you did not assign the result of the first expression to k. I think this is what you are trying to do.

k = ((4*R*r)/((f - Y)^2 + (r + R)^2))^1/2 /. {r -> 0.05, R -> 0.3, 
    f -> 0.1, Y -> 0.8};
A[k_] := EllipticK[k];
B[k_] := EllipticE[k];
(R*r)^1/2/(2*Pi*k) ((2 - k^2)*A[k] - 2*B[k]) /. {r -> 0.05, R -> 0.3}

Hello,

Really I appreciate that. It is work!

 k = ((4*R*r)/((f - Y)^2 + (r + R)^2))^1/2 /. {r -> 0.05, R -> 0.3,  f -> 0.1, Y -> 0.8};
 A[k_] := EllipticK[k];
 B[k_] := EllipticE[k];
 J = (R*r)^1/2/(2*Pi*k) ((2 - k^2)*A[k] - 2*B[k]) /. {r -> 0.05, R -> 0.3, Y -> 0.8} // Simplify

Output

 -0.0756162 + 0.0486827 1.55561[0.0489796]

For some reason, Y was not evaluated. You could check to see where the problem arises by evaluating each line in its own cell. Often just clearing the symbols, and re-running the code will solve the problem. However, I just copied your code and pasted into Mathematica, and the result was 0.0156334.

A simpler alternative in this case might be to globally assign your symbols to their input numerical values

r = 0.5; R = 0.3; f = 0.1; Y = 0.8;
k = ((4*R*r)/((f - Y)^2 + (r + R)^2))^1/2;
A[k_] := EllipticK[k];
B[k_] := EllipticE[k];
(R*r)^1/2/(2*Pi*k) ((2 - k^2)*A[k] - 2*B[k])

This also gives the output as 0.0156334.

Hello,

Thank you so much for all your help!