cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

System of Equations

nascar4us-disab
1-Newbie

System of Equations

I have a system of equations (15 eq, 15 unknowns). I have defined everything for the equations, including the initial guesses of the unknown variables. I am trying to use the Given/Find solution block, but I am not getting an answer. I should get different values of the unknowns with different values of 't'. I don't know what I'm doing wrong.
75 REPLIES 75

On 11/5/2009 2:36:02 PM, Tom_Gutman wrote:
>>>The specification is then: solve the system and give me a data table of the solution(s) that I can read in Excel.<<
>
>If that is what you were
>asking for, and you were
>offering real money for that,
>then that is what I would
>provide. But that is not what
>the original post requested,
>nor did the poster offer any
>money. The question is about
>the behaviour and use of
>Mathcad, and that is what I
>did.
>__________________
>� � � � Tom Gutman
______________________________

You have missed the point as well as the point hinted by Theodore. When you assign the solver as floating on a single ranged variable or 2d f(x,y)and specify the appropriate option and plot, the solver that resides inside the QuickPlot is not the same and lot more advanced than the numerical one the user has access. I have illustrated this by the tracking tool, which tracking tool "tracks wider" than even the very advanced Maple root.

Not knowing more than my observation and conclusion, it is clear that the two solvers, i.e: "Given/Find User" and "Given/Find QuickPlot" are not the same. Easy to check ...

"Portions of the Mathcad Solver � 1990-2003 by Frontline Systems, Inc."

"Mathsoft, MathConnex, QuickPlot, Live Symbolics, IntelliMath and the Collaboratory are trademarks of Mathsoft Engineering & Education, Inc. U.S. Patents 5,469,538; 5,526,475; 5,771,392; 5,844,555; and 6,275,866".

Quite a clear confirmation: the Mathcad QuickPlot solver is by Mathsoft and there is a missing link or a missing option in the Mathcad user Given/Find that does not execute the Mathsoft QuickPlot solver. It could be that this "missing one" was part of the "Numerical Solver Extension Pack".

Now, between you and me and the collab community, I have said and wrote nothing, but maintain my feature suggestion to have the "Mathsoft Quickplot solver" optional or simply replace the "Frontline Systems" (quite a + vis the competition). It could be that the Given/Find 11 and the Given/Find 14 are not the same and that 14 does not output red if based on the "Mathsoft QuickPlot" or an equivalent one. If you have that knowledge, what's so secret about it in a public forum.

jmG


There is no separate quickplot solver. The 2D plotter, whether using the quickplot option or not, simply evaluates the given expressions and plots the results. If the expression is a function invoking find, then the solver is find.
__________________
� � � � Tom Gutman

On 11/5/2009 8:07:17 PM, Tom_Gutman wrote:
>There is no separate quickplot
>solver. The 2D plotter,
>whether using the quickplot
>option or not, simply
>evaluates the given
>expressions and plots the
>results. If the expression is
>a function invoking find, then
>the solver is find.
>__________________
>� � � � Tom Gutman
_______________________________

Yes, I was just going to write the same conclusion with the additional detail. For this case of split range solution, the quickplot includes an "on error" or an equivalent. Thus stopping the solver and plotting. It then keeps running until it can solve again and solves the next part of the solvable range. Thus the empty space. When discretized simply, we get same valid range providing the solvable range stops one value below and starts one value above. Then, for this particular split range, the solver must be programmed to take into account � one solvable value to maintain the solver. A refined piece of programme could implement these two sets of conditions.
The conclusion :
Same solver, that needs a special split range implementation. The other cases encountered were just the opposite, i.e: external exclusion. In fact, for the external exclusion case, it starts where it can, transparent to the user and all conditions to the solver being maintained. For the same conditions to be maintained in the case of the split range, some supplementary instruction is needed. Not a bug but a situation never encountered in the past and not reported. Assuming/presuming such a feature is not implemented in Mathcad 14, then a must, c/w with this live example fresh from recent visit. A good item for the monthly PTC newsletter.

jmG

On 11/5/2009 12:50:59 AM, Tom_Gutman wrote:
>Polyroots is a really bad implementation ...

This is obvious [Alvaro]
_______________________

Check the companion matrix in the tutorials:

"This QuickSheet can be used to calculate the roots of any polynomial using the companion matrix method, which calls Mathcad�s built-in eigenvals function. This method is based on the fact that for a polynomial where the leading coefficient is 1, the eigenvalues of its companion matrix are the roots of the polynomial. See the program,
in the margin to the right, for the implementation of the method...
Upper Bound: You can�t use polyroots to find the roots of a polynomial of degree greater than 99. Typically you won�t have such a large degree polynomial. But if you do, you can try factoring the polynomial symbolically to find lower degree factors. For example, Mathcad can factor" [Mathsoft].

jmG

>If makers of polyroots code can consider bad solutions as procedures answers ...<<br> _____________________

They surely did !

"By default, the polyroots function uses a LaGuerre method of finding roots. If you want to use the companion matrix method instead:
1.Click on the polyroots function with the right mouse button.
2.Choose Companion Matrix from the pop-up menu" [Mathsoft]



From recollection during my beta testing 2001i,
"companion matrix" is 15 digits displayed accuracy.

jmG

The hole at 180 deg don't be sorted in the previous ws by scalling an equation, more important was that I change initials to some other more consistent with a person that don't know the results.

In the attached, the hole persists, as was pointed before in the file that uses Newton Raphson routine. The same vectorial setup, preserving z61 in the denominator only for checking purposes. Added a moddified routine from Tom Gutman's library to plot the bars. Added a modified setup following Tom Gutman squema working with points instead coordinates, and seems that both setups have same answers.

Regards. Alvaro.

Mathcad's derivative operator cannot be applied to a vector. It is scalar only. If you need vector derivatives, use my Jacobian etc. work sheet.
__________________
� � � � Tom Gutman

On 11/5/2009 1:26:23 PM, Tom_Gutman wrote:

>Mathcad's derivative operator cannot be applied to a vector. It is scalar only. If you need vector derivatives, use my Jacobian etc. work sheet.

Forgoten tellme "Elemental, my dear Watson" 🙂

In this case, as P is funciton only of time, mathcad diff works (component by component).

Regards. Alvaro.

What Mathcad diff? Mathcad does not have a function named diff. Mathcad's derivative operator does not apply to a vector function of a scalar, neither numerically nor symbolically. Maple has a diff function which, in MC11, is accessible to the symbolic processor, But it, too, does not apply to a vector function of a scalar. There's a reason why, ever so long ago, I wrote all of the vector calculus derivative functions.
__________________
� � � � Tom Gutman

On 11/5/2009 8:16:00 PM, Tom_Gutman wrote:
>What Mathcad diff? ...

Mathcad derivative operator, the usual. Your library is the best way to deal with Jacobians, but here we have the position as function only of the time, and within the built in operator it is enough.

Attached, derivatives evaluated (only first), but it's slow to make phase plots: discretization helps here. Animation added too.

Regards. Alvaro.

PD: Animation it's another kind of export. Who wants the positions as tables can take out the data from the movie.

Animation file, compressed, windows media format. Original rebase file size limit.

Alvaro.

Attached the famous "for export" schema of things.

Regards. Alvaro.

For vector derivatives the built in differentiation is not enough. You need to write a program. Or, if the vector size is fixed, to write an expression with multiple derivatives. It is your choice as to whether you want to write that program each and every time you need a vector derivative (you've done it twice in just this one sheet) or whether you prefer to just reuse a single routine from a toolkit (for symbolic derivatives VectDeriv, for numeric derivatives VectDerivvn). I prefer to write tools once and reuse them as needed.
__________________
� � � � Tom Gutman

On 11/5/2009 1:31:15 AM, jmG wrote:
>>If makers of polyroots code can consider bad solutions as procedures answers ...<<br> >_____________________
>
>They surely did !

Companion attached.

Regards. Alvaro.

On 11/5/2009 10:41:34 AM, adiaz wrote:
>On 11/5/2009 1:31:15 AM, jmG wrote:
>>>If makers of polyroots code can consider bad solutions as procedures answers ...<<br> >>_____________________
>>
>>They surely did !
>
>Companion attached.
>
>Regards. Alvaro.
_______________________

The stand alone companion.



jmG



One should note that as of MC11.1 the product operator applied to a pair of vectors is not the ordinary dot product, but rather one form of the Hilbert space inner product (the dot product of the first vector and the complex conjugate of the second vector). This make no difference as long as all the values are real, but fails when complex values are used.

Also, in MC11 the symbolic processor is inconsistent about this. With numeric operands the symbolic processor will conjugate the second operand, with symbolic operands it will not. In MC14 the symbolic processor is more consistent, adding the complex conjugate operator to symbolic results.
__________________
� � � � Tom Gutman
Top Tags