Finding Explicit Solution to an Equation
10 views (last 30 days)
Show older comments
Hello,
I am trying to find out the explicit solution to the following equation. I set up the "Condition" field with the help of a Matlab user, yet I failed to get an outcome. (No error message, but No response) Would you check my code, in particular, the last part which contains the equation and let me know what I need to do to get a proper solution? (I am using R2017b version)
format long e
T=0.1;
k=1.0; %k(1) default value is 1.0
k_1=0.2; %k(-1) default value is 2.0 (modified: 1.0)
k_2=0.00001; %k(-1*) default value is 0.1 (Note: k_2=0.00001 higher error rate for n=1 compared to n>1)
%k_2=[0.1:0.1:1.0];
a_p=0.0001; %k(p) default value is 0.0001
k_p=a_p/10; %k(-p) Assuming this ratio is the constant (a_p/10)
a_q=0.00015; %k(q) default value is 0.00015
k_q=0.00002; %k(-q) default value is 0.00002
theta=0.01; %default value is 0.01
m1=0.0000005; %default value is 0.0000005
m2=0.0000002; %default value is 0.0000002
W=0.00002; %default value is 0.002
n=6;
syms x
gamma=(a_p*k*k_2)/(k_p*m1*k_1);
equation=gamma-[1+(theta-x)/(1-theta)*[(1-theta)/(x^(1/(n+1))-theta)]^(n+1)]==0;
sol=solve(equation,x,'ReturnConditions',1);
Accepted Answer
Star Strider
on 25 Jul 2018
This works for me in R2018a:
... CODE ...
sol=solve(equation,x,'ReturnConditions',1);
x = vpa(solve(sol.conditions))
x =
0.2014042781988740154717685102689
What version of MATLAB are you using? Have you kept it updated? (If not, see: Matlab 2018a faulty? for help in updating it.)
0 Comments
More Answers (1)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!