Differentiation Equation- result of Derivative-Multi variable
1 view (last 30 days)
Show older comments
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 Comments
Jan
on 16 Apr 2015
Please remove the copy of the question: http://www.mathworks.com/matlabcentral/answers/203909-differentiation-equation-result-of-derivative-multi-variable-1
Answers (1)
Mischa Kim
on 17 Apr 2015
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)
See Also
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!