Mathematica Asked by FSK on June 1, 2021
I am trying to solve a system of equation symbolically. It works fine for 6×6, however for 12×12 system it takes very long and the answers are complex. I am using "Solve" or "Reduce". When I write Solve[]//FullSimplify there is no Output.
My question is "is there any efficient way to the following system for a1,a2 … a6."
eq1 = (-η)*Exp[(-j)*k*(d - t)] == a1*η*Exp[(-j)*k*t] - a3*ζ*Exp[j*h3*t] -
a4*ζ*Exp[j*h4*t] - a5*ζ*Exp[(-j)*h3*t] - a6*ζ*Exp[(-j)*h4*t];
eq2 = 0 == (-a2)*η*Exp[(-j)*k*t] - j*a3*ζ*Exp[j*h3*t] + j*a4*ζ*Exp[j*h4*t] +
j*a5*ζ*Exp[(-j)*h3*t] - j*a6*ζ*Exp[(-j)*h4*t];
eq3 = 0 == a2*Exp[(-j)*k*t] - j*a3*Exp[j*h3*t] + j*a4*Exp[j*h4*t] - j*a5*Exp[(-j)*h3*t] +
j*a6*Exp[(-j)*h4*t];
eq4 = Exp[(-j)*k*(d - t)] == a1*Exp[(-j)*k*t] + a3*Exp[j*h3*t] + a4*Exp[j*h4*t] -
a5*Exp[(-j)*h3*t] - a6*Exp[(-j)*h4*t];
eq5 = (-a3)*ζ - a4*ζ - a5*ζ - a6*ζ + a7*γ + a8*γ + a9*γ + a10*γ == 0;
eq6 = (-a3)*ζ + a4*ζ + a5*ζ - a6*ζ + a7*γ - a8*γ - a9*γ + a10*γ == 0;
eq7 = -a3 + a4 - a5 + a6 + a7 - a8 + a9 - a10 == 0;
eq8 = a3 + a4 - a5 - a6 - a7 - a8 + a9 + a10 == 0;
eq9 = (-a7)*γ*Exp[(-j)*h1*t] - a8*γ*Exp[(-j)*h2*t] - a9*γ*Exp[j*h1*t] - a10*γ*Exp[j*h2*t] +
a11*η*Exp[(-j)*k*t] == 0;
eq10 = (-j)*a7*γ*Exp[(-j)*h1*t] + j*a8*γ*Exp[(-j)*h2*t] + j*a9*γ*Exp[j*h1*t] -
j*a10*γ*Exp[j*h2*t] - a12*η*Exp[(-j)*k*t] == 0;
eq11 = (-j)*a7*Exp[(-j)*h1*t] + j*a8*Exp[(-j)*h2*t] - j*a9*Exp[j*h1*t] + j*a10*Exp[j*h2*t] -
a12*Exp[(-j)*k*t] == 0;
eq12 = a7*Exp[(-j)*h1*t] + a8*Exp[(-j)*h2*t] - a9*Exp[j*h1*t] - a10*Exp[j*h2*t] +
a11*Exp[(-j)*k*t] == 0;
FullSimplify[Solve[eq1 && eq2 && eq3 && eq4 && eq5 && eq6 && eq7 && eq8 && eq9 && eq10 &&
eq11 && eq12, {a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12}]]
If you replace a few of the complex terms with constants the simplification is done within 15 seconds.
reps = {E^(-j k (d - t)) -> c[1], E^(-h1 j t) -> 1/c[2],
E^(h1 j t) -> c[2], E^(-h2 j t) -> 1/c[3], E^(h2 j t) -> c[3],
E^(-h3 j t) -> 1/c[4], E^(h3 j t) -> c[4], E^(-h4 j t) -> 1/c[5],
E^(h4 j t) -> c[5], E^(-j k t) -> 1/c[6]}
sol1 = Solve[eq1 && eq2 && eq3 && eq4 && eq5 && eq6 && eq7 && eq8 && eq9 &&
eq10 && eq11 && eq12 /. reps,
{a1, a2, a3, a4, a5, a6, a7, a8, a9,
a10, a11, a12}
] // FullSimplify
Then revert the replacements:
repsi = #2 -> #1 & @@@ reps;
sol1 /. repsi // FullSimplify
Correct answer by Sjoerd C. de Vries on June 1, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP