I have the following problem.
I have the following function where each side of the equation is a differnet expression but involving the same variables. Somthing like this:
eqn = (expression(a,b) == expression2(a,b))
I would like to get a as a funciton of b or visaversa.
a = f(b)
b = f(a)
From the equation I have I do not think this can be solved analytically, which is supported by "solve()" function not working.
When i try to use vpasolve() it does not work as I have described the equation using symbolic variables and would like a parametrised solution.
I'd rather not share my code directly for a few reasons (main one as it is a big mess)
This is how the code basically looks:
syms a b c d e f g h k l
Mf(a,b,c,d,e,f,g,h,k,l) = (c*d*(1/((e+f*a+g*b)^h))+(1/((e-f*a-g*b)^h))*k) + a*l*500
Mr(a,b,c,d,e,f,g,h,k,l) = (c*d*(1/((e+f*a*5+g*b*2)^h))+(1/((e-f*a*5-g*b*2)^h))*k*4) +b*l*600
eqn = (Mf(a,b,1,2,3,4,5,1.4,7,8) == Mr(a,b,1,2,3,4,5,1.4,7,8))
solution = solve(eqn, a)
solution = vpasolve(eqn,a)
Is there another way to get a solution. I need a relation between a and b so that I may then get a function, say M = f(a) or M = f(b), which is equivalent to Mf or Mr but is only a function of one variable, as the constraint is that Mf and Mr are equal.
The solution can be numeric, and can even be limited e.g. a = f(b) for -1<b<1.