# Find these Transcendental equation's solution?

Posted 5 years ago
4481 Views
|
19 Replies
|
6 Total Likes
|
 Hi, I'm trying to find out the solution of this trigonometric solution but i'm not able to. I'm looking for your help and advise. Regards  Attachments: Answer
19 Replies
Sort By:
Posted 5 years ago
 FindRoot is probably your best bet. Answer
Posted 5 years ago
 Hi, Frank Kampas, i've tried FindRoot but its not working as well. Answer
Posted 5 years ago
 if you post your code using FindMinimum, we may be able to figure out the problem. Answer
Posted 5 years ago
 In your notebook If I look carefully at Norm[Map[First, eqns]] I notice a Null glaring at me in there and that is a very bad thing.Just looking at eqns won't help you find this because it will be almost invisible, but If I carefully search FullForm[eqns] then I find where the Null is hiding. With this information I see there is a tiny almost invisible extra amount of space between ?2 and Degree in the first equation. Trying to use the delete key to delete that Null resists my efforts, but when I scrape another ?2 Degree and paste that over the ?2 Null Degree then it gets rid of the Null.After fixing that mistake then in a fraction of a second I get In:= NMinimize[Norm[Map[First, eqns]], {?1, ?2, ?3, ?4, ?5}] Out= {0.188495, {?1->55.5012, ?2->-52.2313, ?3->35.9363, ?4->26.3343, ?5->17.6706}} Answer
Posted 5 years ago
 wow, Bill Simpson honestly you are a genius. Thanks a lot Answer
Posted 8 months ago
 I also have a similar problem of solving transcendental equations. I used NMinimize[Norm[Map[First, eqns]],{Y2,Y3,l2,l3}] but its not giving me the correct results. Here are the equations to be solved. eqns={2*Y1*Tan[t11]+Y2*Tan[t21]+Y3*Tan[t31]==0,2*Y1*Tan[t13]+Y2*Tan[t23]+Y3*Tan[t33]==0, t11*Y1 + t21*(Y2/2)*(Sec[t21]^2/Sec[t11]^2) + t31*(Y3/2)*(Sec[t31]^2/Sec[t11]^2)-b1==0, t13*Y1 + t23*(Y2/2)*(Sec[t23]^2/Sec[t13]^2) + t33*(Y3/2)*(Sec[t33]^2/Sec[t13]^2)-b3==0}; All the ts(t21,t31,t23,t33) are in terms of variables l2 and l3. Others are known constants. Answer
Posted 8 months ago
 Are you sure that there is a solution?This should give your equations eqs = Table[ Sum[Cos[j a[i]], {i, 5}] == KroneckerDelta[j, 1], {j, 1, 12, 2}] I think, if you know the cosines you (in a certain sense) know the alphas, so i go upon the cosines eqs1 = (Expand[ eqs /. Cos[j_ x_] :> TrigExpand[Cos[j x]] /. Sin[x_] :> Sqrt[1 - Cos[x]^2]]) /. Cos[a[j_]] :> c[j]; eqs1 // TableForm Renamend the c[i] gives eqs2 = eqs1 /. {c -> x, c -> y, c -> z, c -> u, c -> v}; % // TableForm There is a solution (are there others? I think yes) for the 2nd eqaution, but not for the others eqs2 /. {x -> (3/4)^(1/2), y -> (3/4)^(1/2), v -> (3/4)^(1/2), z -> (3/4)^(1/2), u -> (3/4)^(1/2)} And, by the way, you have 6 equationsLength /@ {eqs, eqs1, eqs2}for 5 alphas eqs /. Cos[x_. a[i_]] -> a[i] /. Equal[x__, y_] -> x /. Plus -> List // Union Answer
Posted 8 months ago
 Sorry sir. I suppose you have given your answer for the previous question. Here are my equations to be solved. Y1 = 0.02; l1 = 0.0172; lambda = {0.0713, 0.0688, 0.0665}; b1 = 0.1170; b3 = 0.1252; t21 = (2*pi/lambda(1))*l2; t31 = (2*pi/lambda(1))*l3; t23 = (2*pi/lambda(3))*l2; t33 = (2*pi/lambda(3))*l3; t11 = (2*pi/lambda(1))*l1; t13 = (2*pi/lambda(3))*l1; eqns={2*Y1*Tan[t11]+Y2*Tan[t21]+Y3*Tan[t31]==0, 2*Y1*Tan[t13]+Y2*Tan[t23]+Y3*Tan[t33]==0, t11*Y1 + t21*(Y2/2)*(Sec[t21]^2/Sec[t11]^2) + t31*(Y3/2)*(Sec[t31]^2/Sec[t11]^2)-b1==0, t13*Y1 + t23*(Y2/2)*(Sec[t23]^2/Sec[t13]^2) + t33*(Y3/2)*(Sec[t33]^2/Sec[t13]^2)-b3==0}; and t21,t31,t23,t33 are in terms of variables l2 and l3. The four unkNowns to be found are Y2,Y3,L2,L3. So I have used NMinimize to find Y2,Y3,l2,l3. NMinimize[Norm[Map[First, eqns]],{Y2,Y3,l2,l3}] But its not giving me the correct solution. If there are more than one solution, which function can show all the solutions of the equations? Answer
Posted 8 months ago
 I think there is no unequivocal solution for your system.You have 4 equations for a lot of unknowns: t12, t21,.....In the following eqns0 is your original system (Please check it) . (But the parameters l2 and l3 are nowhere to be seen). A special difficulty is, that arguments of trigonometric function appear as such and as arguments. I think that means only numerical solutions are possible - if at all. See for example the question, for which x is x + Sin[ x ] == 0 ). I tried to reformulate your equations without trigonometric functions, see eqns1. Then I applied some and arrived at eqn simplifications and arrived at eqns3 (4 equations of course). These are solved for the values of Tan[ t11 ] ,...... (see lsg1). Puttin this back into eqns3 you get eqns 4, which is identically fufilled (see Simplify[ eqns4 ] ). So - at least I think - whatever parameters you put into lsg1, eqns4 and therefore your original system should be fulfilled.But maybe I am wrong. eqns0 = {2*Y1*Tan[t11] + Y2*Tan[t21] + Y3*Tan[t31] == 0, 2*Y1*Tan[t13] + Y2*Tan[t23] + Y3*Tan[t33] == 0, t11*Y1 + t21*(Y2/2)*(Sec[t21]^2/Sec[t11]^2) + t31*(Y3/2)*(Sec[t31]^2/Sec[t11]^2) - b1 == 0, t13*Y1 + t23*(Y2/2)*(Sec[t23]^2/Sec[t13]^2) + t33*(Y3/2)*(Sec[t33]^2/Sec[t13]^2) - b3 == 0}; eqns1 = FullSimplify[(# /. Sec[x_] -> s[x] & /@ eqns0) /. s[x_] -> 1/c[x] /. Cos[x_] -> 1/Sqrt[1 + T[x]] /. c[x_] -> 1/Sqrt[1 + T[x]] /. Tan[x_] -> T[x]]; eqns2 = MapAt[2 (1 + T[t11]) Together[# ] &, eqns1, {{3, 1}}]; Print[" modified equations"] eqns3 = MapAt[2 (1 + T[t13]) Together[# ] &, eqns2, {{4, 1}}] lsg1 = Solve[eqns3, {T[t11], T[t21], T[t13], T[t23]}] // Flatten; eqns4 = (eqns3 /. lsg1); Simplify[eqns4] Answer
Posted 8 months ago
 There is a severe error in the code above, so I did it again.Although I think your system has a lot of different solutions I think I have at least found one (for t31 = 0 and t33 = 0 ). See notebook attached.I suggest to look carefully at the notebook before running it. It could well be that the procedure fails when using other random numbers to start with Attachments: Answer
Posted 8 months ago
 Looking at the whole thing it became clear that things can be done directly. With the definitions in the notebook try fvec = eqns0 /. Equal[a_, b_] -> a /. val2 Then fFvec[t11_, t13_, t21_, t23_][t31_, t33_] := Evaluate[fvec.fvec] and sol2 = FindMinimum[ fFvec[t11, t13, t21, t23][0, 0], {{t11, .1}, {t13, .2}, t21, t23}, MaxIterations -> 1500] eqns0 /. Equal -> List /. val2 /. {t31 -> 0, t33 -> 0} /. sol2[] % // Chop Answer
Posted 8 months ago
 Thank you for your reply. I edited the variables to be found. I tried to run the code which you have provided but it's not able to find the values of l2,l3. As the t variables are in terms of l2,l3, can we be able to find solutions in terms of that? Answer
Posted 8 months ago
 Show your edited post then. What are your independent variables, or in other words what are your modified equations? By the way, I am curious: where do your (really complicated) equations come from? Answer
Posted 8 months ago
 Here is the edited code. Those equations are obtained from the resonant conditions of a microwave filter. So by solving those equations, I have to find the design parameters. Y2,Y3 are the admittances and l2,l3 are the transmission line lengths. These 4 are the independent variables. And I need to find these values close to Y2=0.02265, Y3=0.02042, l2=0.01811, l3=0.01638. Y1 = 0.02; l1 = 0.0172; lambda = {0.0713, 0.0688, 0.0665}; b1 = 0.1170; b3 = 0.1252; t21 = (2*pi/lambda(1))*l2; t31 = (2*pi/lambda(1))*l3; t23 = (2*pi/lambda(3))*l2; t33 = (2*pi/lambda(3))*l3; t11 = (2*pi/lambda(1))*l1; t13 = (2*pi/lambda(3))*l1; eqns={2*Y1*Tan[t11]+Y2*Tan[t21]+Y3*Tan[t31]==0, 2*Y1*Tan[t13]+Y2*Tan[t23]+Y3*Tan[t33]==0, t11*Y1 + t21*(Y2/2)*(Sec[t21]^2/Sec[t11]^2) + t31*(Y3/2)*(Sec[t31]^2/Sec[t11]^2)-b1==0, t13*Y1 + t23*(Y2/2)*(Sec[t23]^2/Sec[t13]^2) + t33*(Y3/2)*(Sec[t33]^2/Sec[t13]^2)-b3==0}; Answer
Posted 8 months ago
 Modified code corrected for pi and Part: Y1 = 0.02; l1 = 0.0172; lambda = {0.0713, 0.0688, 0.0665}; b1 = 0.1170; b3 = 0.1252; t21 = (2*Pi/lambda[])*l2; t31 = (2*Pi/lambda[])*l3; t23 = (2*Pi/lambda[])*l2; t33 = (2*Pi/lambda[])*l3; t11 = (2*Pi/lambda[])*l1; t13 = (2*Pi/lambda[])*l1; eqns = {2*Y1*Tan[t11] + Y2*Tan[t21] + Y3*Tan[t31] == 0, 2*Y1*Tan[t13] + Y2*Tan[t23] + Y3*Tan[t33] == 0, t11*Y1 + t21*(Y2/2)*(Sec[t21]^2/Sec[t11]^2) + t31*(Y3/2)*(Sec[t31]^2/Sec[t11]^2) - b1 == 0, t13*Y1 + t23*(Y2/2)*(Sec[t23]^2/Sec[t13]^2) + t33*(Y3/2)*(Sec[t33]^2/Sec[t13]^2) - b3 == 0}; Define function to work with vec = eqns /. Equal[a_, b_] -> a ff[Y2_, Y3_, l2_, l3_] := Evaluate[vec.vec] Try to find a minimum, 1) generally, 2) around your proposals sol1 = FindMinimum[ff[Y2, Y3, l2, l3], {Y2, Y3, l2, l3}] sol2 = FindMinimum[ff[Y2, Y3, l2, l3], {{Y2, .02}, {Y3, .02}, {l2, .018}, {l3, .016}}] and check the results by inserting them in your equations eqns /. Equal -> List /. sol1[] eqns /. Equal -> List /. sol2[] % // Chop Answer
Posted 8 months ago
 Thank you very much for your efforts and time. I would like to know if there is any function that can accurately and precisely give the solution for the below equation without specifying the range. sol2 = FindMinimum[ff[Y2, Y3, l2, l3], {{Y2, .02}, {Y3, .02}, {l2, .018}, {l3, .016}}] {3.0425*^-25,{Y2->0.0226146,Y3->0.0203776,l2->0.0181013,l3->0.0163783}} Answer
Posted 8 months ago
 I worked a bit about it, but I am afraid there is no function to solve your equations. Answer
Posted 8 months ago
 Okay. Thanks a lot. Answer
Posted 8 months ago
 Find these Transcendental equation's solution? Answer