Clear Filters
Clear Filters

Solve set of equations

1 view (last 30 days)
marijn de volder
marijn de volder on 8 Aug 2016
Edited: John D'Errico on 11 Aug 2016

Hello,

I have a set of equations with 4 BC. I want to plot w(x),teta(x),M(x) and V(x).

w(x)=w0*F1+te0/la*F2-M0/(la^2*Eb*Ib)*F3-V0/(la^3*Eb*Ib)*F4+P/(la^3*Eb*Ib)*F4*(la*(x-xp));

teta(x)=-4*la*w0*F4+te0*F1-M0/(la*Eb*Ib)*F2-V0/(la^2*Eb*Ib)*F3+P/(la^2*Eb*Ib)*F3*(la*(x-xp));

M(x)=k*b*w0/la^2*F3+k*b*te0/la^3*F4+M0*F1+V0/la*F2-P/la*F2*(la*(x-xp));

V(x)=k*b*w0/la*F2+k*b*te0/la^2*F3-4*la*M0*F4+V0*F1-P*F1*(la*(x-xp));

With:

  • w0=C1+C3
  • te0=la*(C1+C2-C3+C4)
  • M0=2*la^2*Eb*Ib*(-C2+C4)
  • V0=2*la^3*Eb*Ib*(-C1-C2-C3-C4)

With Boundary conditions: M(0)=0 ,M(L)=0, V(0)=0 and V(L)=0.

Thanks in advance

Accepted Answer

John D'Errico
John D'Errico on 11 Aug 2016
Edited: John D'Errico on 11 Aug 2016
You have four equations that are functions of x. But you also have many other variables.
Here is the first equation:
w(x)=w0*F1+te0/la*F2-M0/(la^2*Eb*Ib)*F3-V0/(la^3*Eb*Ib)*F4+P/(la^3*Eb*Ib)*F4*(la*(x-xp));
From this one equation, you appear to have unknowns w0, F1, te0, la, F2, M0, Eb, Ib, F3, V0, F4, P, xp. What is that, 13 unknowns?
Then you have similar equations for teta(x), M(x), V(x). I've not looked carefully. You may have some more unknowns hidden in them too. For example, is L a known value, or is L unknown too?
Do all of those parameters have known values? You cannot plot something with completely unknown parameters in it.
So I'll assume that you do indeed have KNOWN values for every one of those 13 (or more) parameters.
Then you have 4 more parameters, C1,C2,C3,C4. Are these really unknowns?
In the end, it appears that you really have 8 pieces of information. 4 come from here:
w0=C1+C3
te0=la*(C1+C2-C3+C4)
M0=2*la^2*Eb*Ib*(-C2+C4)
V0=2*la^3*Eb*Ib*(-C1-C2-C3-C4)
Then you have 4 more pieces of information from these equations.
M(0)=0
M(L)=0
V(0)=0
V(L)=0
The equations for teta and w are irrelevant, at least in terms of determining anything of use.
So substitute 0 and L into each of the equations for M and V. This leaves you with 8 equations, with somewhere between 4 and 17 unknowns. We don't know how many, as you never told us that.
The problem will be that you cannot solve 8 equations (in general) if you have less than 8 unknowns, or more than 8 unknowns. Solve won't let you do so. Too many unknowns (more than 8) and there is no unique solution in general. That means there are an infinite set of solutions, any one of which will be equally valid.
Less than 8 unknowns, and solve won't allow you to try, because there will be no exact solution. So at best you can try to find a solution that minimizes the errors in some way. Again, solve won't even try. Solve is not a least squares solver. So if you think you can use the symbolic toolbox solve or vpasolve tools, unless you have exactly 8 unknowns, then you will be wasting your time.
Ok, suppose you happen to know all but 8 of those unknowns, so, in theory, you can solve the problem, IN THEORY. Again, in theory, a solution exists for the 8 unknown variables. Too bad. Solve will still fail.
Why will solve fail? Actually, it will probably just freeze, or appear to do so. These equations will reduce to an extremely high order polynomial equation. So, in theory, solve will use one equation to eliminate C1 from the rest of the equations. For example,
w0 = C1 + C3
Substitute for one of these variables into the other 7 equations. This will leave 7 messier equations in 7 unknowns.
Then solve will try to eliminate, say C2, from 6 equations. They will now be incredibly messy. Solve is a computer program though. It won't give up. But what happens is these equations get so incredibly complex, with many thousands, or even millions of nasty looking terms. So solve will take forever. It bogs down.
Suppose that after weeks or years of computation, solve DID manage to reduce the problem to ONE equation, with probably millions of terms in it all in only one variable, say C4. That one equation could possibly in theory be reducible to a very high order polynomial equation in C4, with numerical coefficients.
But then, what do we know about high order polynomials? Oh, yes. There is that little proof by Abel, that tells us there is no analytical solution exists if the polynomial is above degree 4.
https://en.wikipedia.org/wiki/Abel–Ruffini_theorem
So at best, solve might be able to reduce the problem to numerical one, passing it to vpsolve in the end. More likely, you will have given up waiting for solve to stop its ruminations, months before it gets to that point. Or your computer will very likely have run out of memory in the attempt. Symbolic problems like this get huge, and do so very fast.
So sorry, but just wanting to solve some mess of equations is not sufficient. You need to do some re-thinking of your problem. I know. You probably won't believe me. You will try throwing these equations into solve anyway. Hey it might work! In fact, years ago once I tried exactly that with a MUCH less nasty problem, and it worked! I've never seen that happen since though. Almost always, what happens is after trying to use solve on such a problem, the person then comes back wailing that their computer seems to hang when they use solve on this. If that happens, then return to what I've said here. Re-read it.

More Answers (1)

AlexP
AlexP on 11 Aug 2016
Assuming that you are trying to solve the equations for the 4 constants - C1,C2,C3,C4; I would suggest you to use the "solve" function available in base MATLAB.
Below is the link to the documentation
The document has examples on how to use the solve function for multiple equations.

Categories

Find more on Christmas / Winter 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!