Solving equations when variable is included in mu and sigma of distribution function
Mostra commenti meno recenti
Hello
I'm trying to solve the following equation
c = 1.60
q = 0.08
equity = 0.08
p = 3.26
sigma = 0.1
mu = 0.08
syms r
vpasolve((c*q-equity)*(1+r)/p==(-p/(1+r)+p*(1-normcdf((c*q-equity)*(1+r)/p,(c*mu-equity)*(1+r)/p,c*(1+r)/p*sigma)))*(c*(1-normcdf(q,mu,sigma))-(c*q-equity)*normpdf(q,mu,sigma))/((p/(1+r))^2*normpdf(q,mu,sigma)-c^2*normpdf((c*q-equity)*(1+r)/p,(c*mu-equity)*(1+r)/p,c*(1+r)/p*sigma)),r,[0 1],'random',true)
However, Matlab returns an error message
symengine
Cannot prove '(1809252434946447*r)/36729926713742350 + 1809252434946447/36729926713742350 == 0 &
0.0000000000000000025671305227897154891565148192726*r + 0.0000000000000000025671305227897154891565148192726 <
- (12505220420059*r)/554413988131960 - 12505220420059/554413988131960' literally. To test the statement
mathematically, use isAlways.
sym/subsindex (line 762)
X = find(mupadmex('symobj::logical',A.s,9)) - 1;
sym/privsubsasgn (line 1031)
L_tilde2 = builtin('subsasgn',L_tilde,struct('type','()','subs',{varargin}),R_tilde);
sym/subsasgn (line 868)
C = privsubsasgn(L,R,inds{:});
normcdf>localnormcdf (line 100)
p(sigma==0 & x<mu) = 0;
normcdf (line 46)
[varargout{1:max(1,nargout)}] = localnormcdf(uflag,x,varargin{:});
My guess is that Matlab is trying to test sigma==0 & x<mu, but it cannot because the symbolic variable r is included in sigma and mu. However, sigma is always >0 because of the range of r I have set.
How can I solve the equation in this case?
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Calculus in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!