MATLAB Answers

Symbolic three-equation system, three variables to first derivative of each variable in each equation

2 views (last 30 days)
VincentLec
VincentLec on 13 Jun 2016
Commented: VincentLec on 13 Jun 2016
Hello, I have this symbolic equation system:
Eqn1 = A(t)*x(t) + B(t)*y(t) C(t)*z(t) + D(t)*dx(t)/dt + E(t)*dy(t)/dt + F(t)*dz(t)/dt == f1(t);
Eqn2 = G(t)*x(t) + H(t)*y(t) I(t)*z(t) + J(t)*dx(t)/dt + K(t)*dy(t)/dt + L(t)*dz(t)/dt == f2(t);
Eqn3 = M(t)*x(t) + N(t)*y(t) P(t)*z(t) + Q(t)*dx(t)/dt + R(t)*dy(t)/dt + S(t)*dz(t)/dt == f3(t);
Of course, I know the formulas of A(t)..S(t) as well as the formulas of f1(t), f2(t) and f3(t) (they are just way too long to copy-paste here)
Now, my goal is to determine the formulas of x(t), y(t) and z(t) and I have absolutely no idea how to proceed... Also, not sure if that helps, but all the equations are sin and cos functions.
Thanks a bunch for all of your help

  0 Comments

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 13 Jun 2016
You can use the Symbolic Toolbox dsolve() .
However, if the formula are complicated, it would be common for dsolve to not be able to find a solution. Differential equations can be difficult to solve symbolically.

  3 Comments

VincentLec
VincentLec on 13 Jun 2016
Would converting the symbolic function to a MatLab Function using matlabFunction make it easier for Matlab to solve them? For example, what if I did
eqn11 = matlabFunction(eqn1)
eqn22 = matlabFunction(eqn2)
eqn33 = matlabFunction(eqn3)
before using dsolve().
Walter Roberson
Walter Roberson on 13 Jun 2016
No, dsolve() is strictly symbolic and matlabFunction is for creating numeric routines (e.g., routines you might use with one of the ode* functions.)

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by