Solve symbolic equation for a variable which itself is a function of time
2 views (last 30 days)
Show older comments
Hello
I am trying to solve a symbolic equation for the variable, theta_ddot.
I have defined the angle (theta) and acceleration (theta_ddot) as time dependant, which seems to cause a problem when I try to solve the equation symbolically. MATLAB give the warning: "Warning: Unable to find explicit solution. For options, see help"
I have tried to not define theta and theta_ddot as time dependant which solves the problem. However I need them to be time dependant since I have to take the time derivative later on so I can't do that.
I have attached my code below
syms m a J theta_ddot(t) theta(t) tau_1 g eq1
eq1 = (m*a^2 + J) * theta_ddot + a*g*m*cos(theta)
S = solve(tau_1 == eq1,theta_ddot)
Hope someone can help explain what seems to be the problem. :)
Thanks in advance
0 Comments
Answers (1)
Steven Lord
on 26 Sep 2023
2 Comments
Walter Roberson
on 26 Sep 2023
Edited: Walter Roberson
on 26 Sep 2023
syms m a J theta_ddot(t) theta(t) tau_1 g eq1
theta_dot = diff(theta);
theta_ddot = diff(theta_dot);
eq1 = (m*a^2 + J) * theta_ddot + a*g*m*cos(theta)
S = dsolve(tau_1 == eq1)
tdd = diff(S, t, t)
simplify(tdd, 'steps', 50)
Derivative of union is not a good sign.
In the final result, the reason for there to be a conditional on the 0 and for there to be no other values, is that it is MATLAB's way of saying that the solution can be defined as 0 under those particular cases, but is otherwise undefined.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!