Path: news.mathworks.com!not-for-mail From: <HIDDEN> Newsgroups: comp.soft-sys.matlab Subject: Re: solve: multiple equations multiple parameters Date: Mon, 29 Mar 2010 14:38:26 +0000 (UTC) Organization: The MathWorks Inc Lines: 47 Message-ID: <hoqe12$9nf$1@fred.mathworks.com> References: <honk7t$lqf$1@fred.mathworks.com> <hoog4a$o1$1@fred.mathworks.com> Reply-To: <HIDDEN> NNTP-Posting-Host: webapp-05-blr.mathworks.com Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: fred.mathworks.com 1269873506 9967 172.30.248.35 (29 Mar 2010 14:38:26 GMT) X-Complaints-To: news@mathworks.com NNTP-Posting-Date: Mon, 29 Mar 2010 14:38:26 +0000 (UTC) X-Newsreader: MATLAB Central Newsreader 1520503 Xref: news.mathworks.com comp.soft-sys.matlab:621523 "Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <hoog4a$o1$1@fred.mathworks.com>... > "Katharina Zwicky" <katharina.zwicky@gmail.com> wrote in message <honk7t$lqf$1@fred.mathworks.com>... > > ..... > > i ve these 5 equations: f, g, their derivatives df and dg and the product of the derivatives is supposed to be one (df*dg=1). i would like to solve for k11,k22 and y as a function of x ..... > > ........ > > syms x y k11 k22 n > > eqn{1}='f=k11/(1+y^n)' > > eqn{2}='g=k22/(1+x)' > > eqn{3}='df=-k11/(1+y^n)^2*y^n*n/y' > > eqn{4}='dg=-k22/(1+x)^2' > > eqn{5}='dg*df=1' > > > > [k11,k22,y]=solve(eqn{1},eqn{2},eqn{3},eqn{4},eqn{5}) > --------------- > As I understand it, you have two functions, f(y) and g(x), which are each known except for parameters k11, k22, and n, and you specify that the product of their respective derivatives shall be unity. Therefore what you are requiring is that: > > -k11/(1+y^n)^2*(n*y^(n-1)) = -k22/(1+x) > > (Your derivative for df was in error.) > > That is one equation and a lot of unknowns and is therefore not a well-defined problem. The only thing you can really state is that if the ratio of k11 to k22 is given and n is also given, you could in principle determine y as a function of x, though many solutions may be possible, depending on n. > > Given k11/k22 and n, you could certainly determine x as a function of y, but the reverse of finding y as an explicit function of x may not be possible if n is four or greater. Remember that it has been mathematically proven that no explicit solution for general polynomial equations of degree five or higher exists over the rationals in terms of radicals. Matlab can be forgiven if it gives up on such problems. > > Roger Stafford I think Roger's final equation is "df = dg" instead of "df*dg = 1", but his general point is still valid: Your system of equations can be reduced to a single equation involving k11, k22, n, x, and y. You can still come up with an analytical solution for x in terms of the other variables. Here's how I would have solved the problem, also using the Symbolic Toolbox to calculate the derivatives: >> syms x y k11 k22 n >> df = diff(k11/(1+y^n), y) df = -(k11*n*y^(n - 1))/(y^n + 1)^2 >> dg = diff(k22/(1+x), x) dg = -k22/(x + 1)^2 >> solution = solve(df*dg-1, x) solution = ((k11*k22*n*y^n)/y)^(1/2)/(y^n + 1) - 1 - ((k11*k22*n*y^n)/y)^(1/2)/(y^n + 1) - 1