Message Boards Message Boards


Can someone interpret the output?

Posted 1 year ago
4 Replies
1 Total Likes

Hello, I am very very new in Mathematica. I am deriving equations for a system of pendulums using the Lagrange function. As you can see, I wrote down the equations of the coordinates of the pendulums, and the output then is the Lagrange function, but I do not quite understand it. Can someone introduce me?

4 Replies

What is your question specifically? Is it about code or physics? Per forum rules you need to be detailed about what you are asking:

It looks like you have some variables already defined as interpolating functions from a previous evaluation. Try restarting the kernel reevaluating.

Posted 1 year ago

Thanks for your answer, I reinstalled Mathematica and now it works.

When defining a function use patterns in the left-hand side:

o[t_] = sec[(b''[t]*L*M)/(k1*r)];
gamma[t_] = (a''[t]*L*M)/(k2*cos[o[t]]);
x1[t_] = (b''[t]*L*M)/k1;
y1[t_] = r*sin[o[t]] + gamma[t];
x2[t_] = L*(sin[a[t]]*cos[b[t]]) + x1;
y2[t_] = L*(sin[a[t]]*sin[b[t]]) + y1;
z2[t_] = -L*cos[a[t]];

Also, you probably have to write x1[t] instead of simply x1 in the right-hand side. Functions like sine and cosine must be written with capital initials: Sin, Cos, Sec etc.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract