Differentiation Equation- result of Derivative-Multi variable

1 次查看(过去 30 天)
I have math like this:
L=5
x=5*L^2 %x=125
I need to have a result of y; y=diff(x)=50
Mr. Mischa has just help me to solve it:
syms y(x) % define y as a function of x symbolically
L = 5;
y = 5*x^2; % define the function y
dy = diff(y,x); % compute its derivative
dyL = subs(dy,x,L) % compute the derivative at x = L
But now, I have a same requirement, like the upper one. but it have multi varialble like this:
a=(((m*w^2-k)/(E*mI))^2+(c*w/(E*mI))^2)^(1/8);
b= atan(-c*w/(m*w^2-k))/4+pi/4;
X=a*cos(b);
Y=a*sin(b);
sa=cosh(L*X)*cos(L*Y);
sb=sinh(L*X)*sin(L*Y);
HOw can I get X',Y',sa',sb'. (with m,w,mi,k,c,and E are constant) I don't know the name of this derivative. but it's result like that
X'=a'*cos(b)-a*b'*sin(b)
Y'=a'*sin(b)+a*b'*cos(b)
sa'=L*X'*cos(L*Y)*sinh(L*X)-L*Y'*sin(L*Y)*cosh(L*X)
sb'=L*Y'*cos(L*Y)*sinh(L*X)+L*X'*sin(L*Y)*cosh(L*Y)
I don't know how to say this derivative's name in ENGLISH. After the matlab calculate 4 equation, I insert the number of e,m,c,k,mI... in to the equation, then I get the finally result. w is independent variable.
My first target of these question is solve a very very long equation.
So, I want to decrease the rick of wrong equation when I typing, thus I must split a long equation into many smaller equation. With a normal formular, it is ok. but, when I derivative it, there are a problem. because, matlab with calculate that smaller eq become a number, then matlab derivative it become zero.
Such as, I have a velocity of 1 element, I derivative it, I get the acceleration.
So, the velocity is easy to get by some normal eq, but the accelerator, I must to derivative those eq. That is the problem of mine.
I has just learning about matlab for a week. Sorry about my complex. Thank you very much
  3 个评论

请先登录,再进行评论。

回答(1 个)

Mischa Kim
Mischa Kim 2015-4-17
Vu, see the example below.
syms a(t) b(t) X t
X = a*cos(b);
dX = diff(X)
dX(t) =
cos(b(t))*diff(a(t), t) - sin(b(t))*a(t)*diff(b(t), t)
  1 个评论
vu ngothanh
vu ngothanh 2015-4-17
Mr. Mischa, my first target of these question is solve a very very long equation.
So, I want to decrease the rick of wrong equation when I typing, thus I must split a long equation into many smaller equation. With a normal formular, it is ok. but, when I derivative it, there are a problem. because, matlab with calculate that smaller eq become a number, then matlab derivative it become zero.
Such as, I have a velocity of 1 element, I derivative it, I get the acceleration.
So, the velocity is easy to get by some normal eq, but the accelerator, I must to derivative those eq. That is the problem of mine.
I has just learning about matlab for a week. Sorry about my complex. Thank you very much

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by