Substitute term with variable

2 visualizaciones (últimos 30 días)
Magnus
Magnus el 9 de Oct. de 2014
Comentada: Magnus el 10 de Oct. de 2014
Dear all,
I'm trying to substitute a rather long term
(L/T*z-U(i-1)*z-(Ui(i)-Ui(i-1))/(di(i-1)-di(i))*(z^2/2+di(i-1)*z)+ ...
(Xi(i)*sinh(2*pi*z/L)+Yi(i)*cosh(2*pi*z/L))*cos(2*pi*x/L)
with one variable, Psi(i). I tried on Mupad using subsex, but this doesn't work. I know, however, if you re-arrange the equation below, that the term given above exists. There is probably no explicit matlab/mupad function that could handle the issue (is there??) but maybe you came across with a procedure that solves the problem. Also maybe in more general terms.
The idea behind all this is, that I want to differentiate the equation below with respect to Psi. Therefore, I thought re-arranging would be the most applicable approach, but, again, I'd also appreciate other ideas.
Thanks a lot in advance, Cheers,
&nbsp
(int(((int(((-Ui(4.0)+L/T+cos((pi*x*2.0)/L)*((pi*Xi(5.0)*...
cosh((H*pi*cos((pi*x*2.0)/L))/L)*2.0)/L+(pi*Yi(5.0)*...
sinh((H*pi*cos((pi*x*2.0)/L))/L)*2.0)/L)+((Ui(4.0)-Ui(5.0))*(di(4.0)+...
H*cos((pi*x*2.0)/L)*(1.0/2.0)))/(di(4.0)-di(5.0)))^2*(1.0/2.0)+...
1.0/L^2*pi^2*sin((pi*x*2.0)/L)^2*(Yi(5.0)*...
cosh((H*pi*cos((pi*x*2.0)/L))/L)+Xi(5.0)*...
sinh((H*pi*cos((pi*x*2.0)/L))/L))^2*2.0)/g+H*cos((pi*x*2.0)/L)*...
(1.0/2.0),x,0.0,L*(1.0/2.0))*-2.0)/L+((-Ui(4.0)+L/T+cos((pi*x*2.0)/L)*...
((pi*Xi(5.0)*cosh((H*pi*cos((pi*x*2.0)/L))/L)*2.0)/L+(pi*Yi(5.0)*...
sinh((H*pi*cos((pi*x*2.0)/L))/L)*2.0)/L)+((Ui(4.0)-Ui(5.0))*...
(di(4.0)+H*cos((pi*x*2.0)/L)*(1.0/2.0)))/(di(4.0)-di(5.0)))^2*...
(1.0/2.0)+1.0/L^2*pi^2*sin((pi*x*2.0)/L)^2*(Yi(5.0)*...
cosh((H*pi*cos((pi*x*2.0)/L))/L)+Xi(5.0)*sinh((H*pi*...
cos((pi*x*2.0)/L))/L))^2*2.0)/g+H*cos((pi*x*2.0)/L)*...
(1.0/2.0))^2,x,0.0,L*(1.0/2.0))*2.0)/L;
  2 comentarios
José-Luis
José-Luis el 9 de Oct. de 2014
I don't understand the problem, sorry. Why don't you make the "term" a function of i and call it when needed.
Magnus
Magnus el 10 de Oct. de 2014
Because Psi is differentiated before. The problem is something like this: diff(diff(Psi,x),Psi). In order to do the d/dPsi I would like to re-collect the definition of Psi, see above, and then substitute this expression with Psi again.

Iniciar sesión para comentar.

Respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by