MATLAB: Solving equations in terms of expression

equationsolve

Hello everyone, I have 6 equations to solve in MATLAB. I have written a program for that, but the problem is it showing zero value with a warning "Explicit solution could not be found.". I don't know where I am going wrong or may be I should use some other technique to solve this. Please help me to solve this problem.
Thank you.
X = [0.122;0.0578;0.0138;0.147;0.0718;0.0151];
Y = [12;12;12;42;42;42];
Z = [0.000375;0.0015;0.01125;0.000375;0.0015;0.01125];
syms a b c d e f
eq1 = a*(1+tanh(log((b/Z(1))^c)))*Y(1)*d*(1+tanh(log((e/Z(1))^f))) == X(1);
eq2 = a*(1+tanh(log((b/Z(2))^c)))*Y(2)*d*(1+tanh(log((e/Z(2))^f))) == X(2);
eq3 = a*(1+tanh(log((b/Z(3))^c)))*Y(3)*d*(1+tanh(log((e/Z(3))^f))) == X(3);
eq4 = a*(1+tanh(log((b/Z(4))^c)))*Y(4)*d*(1+tanh(log((e/Z(4))^f))) == X(4);
eq5 = a*(1+tanh(log((b/Z(5))^c)))*Y(5)*d*(1+tanh(log((e/Z(5))^f))) == X(5);
eq6 = a*(1+tanh(log((b/Z(6))^c)))*Y(6)*d*(1+tanh(log((e/Z(6))^f))) == X(6);
sol=solve([eq1,eq2,eq3,eq4,eq5,eq6],'a','b','c','d','e','f');

Best Answer

solve() is for finding exact closed-form solutions. It is almost always a logical error to seek exact closed-form solutions for questions that involve decimal numbers. For example are we to understand 0.122 as being exactly 122/1000, or are we to understand it as being a number which has been rounded to 0.122 and so is really a number in the interval [0.1215, 0.1225) ? If we could back-construct and find that there was a solution only if the value happened to be exactly (122831927 + 5*sqrt(2))/1000000000 then are we to understand that is the solution we should look for?
You could try with vpasolve(), but that is not certain to find a solution.
The problem becomes easier to deal with if you happen to know that there is a transformation from tanh(log(x)) to (x^2+1)/(x^2-1) as that allows you to get rid of the trig expressions. However, you can only cleanly eliminate 2 of the variables step-wise, at most 3 of the variables, before you start hitting expressions for which there is no closed form solutions or expressions for which computing the solution takes a long long time.
Note that since a*d appears as a multiplicative factor in all of the expressions, and a and d are not used otherwise, it is going to be impossible to isolate a from d: you can at best find their product. And since you have 6 equations in 6 unknowns, that hints that the equations are over-determined, that it will not be possible to accommodate the final equation along with the other 5 -- because you could clearly replace the product a*d with a single variable ad, which would leave you with 6 equations in 5 unknowns.