Useful results from solve function

3 ビュー (過去 30 日間)
Florian Hölscher
Florian Hölscher 2021 年 5 月 31 日
コメント済み: Torsten 2021 年 6 月 1 日
Hey,
I'm trying to solve 2 equations using the solve function. The first one for beta, the second one for lambdai. For the first equation, I get the following results: S = [x z1]
for the second one I get the error: Warning: Unable to find explicit solution.
I tried the help page, which suggested assumptions and some other things, but nothing that worked. Does anyone know how to solve these?
This is the code with the equations:
%%Equation 1
syms lambdai lambda beta
eqn = lambdai == 1/(1/(lambda+0.08*beta)-0.035/(beta^3+1));
S = solve(eqn,beta);
%% Equation 2
syms lambdai lambda beta cp c1 c2 c3 c4 c5 c6
eqn = cp == c1*(c2/lambdai-c3*beta-c4)*exp(-c5/lambdai)+c6*lambda;
Q = solve(eqn,lambdai);
c1 to c6 are constants, in case that helps..
  2 件のコメント
Torsten
Torsten 2021 年 5 月 31 日
編集済み: Torsten 2021 年 6 月 1 日
For the second equation, Wolframalpha gives a solution involving the "analytic continuation of the product log function", thus very special and hard to use in practise.
The first one gives a polynomial equation of degree 4 in beta. The form and number of solutions depend on the numerical values of lambda and lambdai.
Florian Hölscher
Florian Hölscher 2021 年 6 月 1 日
This is for the second equation? But atleast the first one should be easier to solve?

サインインしてコメントする。

回答 (1 件)

Steven Lord
Steven Lord 2021 年 5 月 31 日
Try substituting values for the constants c1 through c6 and cp before trying to solve it.
I expect that you're going to argue that you want a general solution that is a function of the constants. But the more general the equation is the more difficult it is likely to be to solve. If you tell me "I want something to eat" I may have to suggest a number of different food items before hitting upon the one thing you had in mind. If you tell me "I want a cookie" the "parameter space" is a lot easier to search. [And now I think it's time for me to get lunch.]
  3 件のコメント
Florian Hölscher
Florian Hölscher 2021 年 6 月 1 日
What actually works for the second eqn is if I give values for c1-6, cp and lambda. However, I need cp and lambda as variables in my output eqn..
%% Equation 2
syms lambdai lambda beta cp c1 c2 c3 c4 c5 c6
eqn = cp == 0.5176*(116/lambdai-0.4*beta-5)*exp(-21/lambdai)+0.0068*4.8;
Q = solve(eqn,lambdai)
Result:
Q =
1/(beta/290 - lambertw(-1, -(325983*exp((21*beta)/290 + 105/116))/187630)/21 + 5/116)
Torsten
Torsten 2021 年 6 月 1 日
Use
solve cp == c1*(c2/lamdai - c3*beta - c4)*exp(-c5/lambdai) + c6*lambda , x
under
wolframalpha.com and experiment with your equations.
As Steven Lord said, it does not make much sense to work with solutions to equations of such generality because in the end, all parameters will be substituted by numerical values and vpasolve will most probably be successful.

サインインしてコメントする。

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by