I have a system of three differential equations. In this case, it is a simple enough idea to solve the first for x1…sub value for x1 into second equation, solve for x2 and sub it into the third equation.
This was working out fine until I reached the final substitution. If it hadn't worked from the start then I probably wouldn't be as puzzled.
Alpha, beta, and delta are to remain undefined in this context, and simply carried through in each equation.
Dx1 = p – x1*alpha
Dx2 = x1*alpha – x2*beta
Dx3 = x2*beta – x3*delta
x1(0)=0, x2(0)=0, x3(0)=0
I can't imagine that the introduction of "delta" is my problem. Have I asked too much of "dsolve"?
Thank you for any advice you have. I'll keep checking into the errors, but they haven't shed any light on the situation for me yet.
>> soln1 = dsolve('Dx1 = p - x1*alpha','x1(0) = 0', ' t ' ) soln1 = (p - p/exp(alpha*t))/alpha >> soln2 = dsolve('Dx2 = soln1*alpha - x2*beta','x2(0) = 0', ' t ' ) soln2 = (alpha*soln1 - (alpha*soln1)/exp(t*beta))/beta >> soln3 = dsolve('Dx3 = soln2*beta - x3*delta','x3(0) = 0', ' t ' )??? Error using ==> mupadmexError in MuPAD command: Illegal variable context [DOM_VAR];during evaluation of 'solvelib::indets'Error in ==> sym.sym>sym.mupadmexnout at 2003 out = mupadmex(fcn,args{:});Error in ==> dsolve>mupadDsolve at 190[var_list,R] = mupadmexnout('mllib::dsolve',sys,x,ignoreConstraints);Error in ==> dsolve at 97[R,vars] = mupadDsolve(ignoreConstraints,varargin{1:narg});
Best Answer