Skip to main content
1-Visitor
July 8, 2010
Question

Multiple equalities in a Mathcad Equation

  • July 8, 2010
  • 5 replies
  • 15217 views

Why Mathcad do not allow equalities like:

a:=(x+y)^2:=x^2+y^2+2*x*y

in witch to consider finally as a equality between first and last term? so being a:=x^2+y^2+2*x*y

Mathcad dont allow to insert a second equal sign in a given equation where to expose succesively the intermediary forms of a given identity.

5 replies

1-Visitor
July 8, 2010

What you attempted has no mathematical meaning, then no use.

The purpose of writing an equality is to solve for some of the variables ,

like in the qs examples [if you want to produce something].

Some functions have more than the simple book style.

Here is the longest found in the Mathcad collab [yellow].

Then, there is/are the equal forms that do not numerically

execute the same way. Those cases are hard to find, they

will generally arrive from the designer.

jmG

1-Visitor
July 8, 2010

Unclear what you are trying to do. If you are using the symbolic processor, it already understands the second equivalence.

TTFN

1-Visitor
July 8, 2010

To get what you want, a:=(x+y)^2:=x^2+y^2+2*x*y.

Type in (x +y)^2 then apply symbolic expand from the Symbolics palette.

Mona

tubar1-VisitorAuthor
1-Visitor
July 8, 2010

nope, is not necessary to use mathcad processor for simple cases.

Is a problem of flexibility for Mathcad, that's all. My proposal is not in any contradiction with anithing. It respect all mathematical rule. Mathcad instead is not flexible in this option.

My proposal is to make somehow Mathcad to edit equations just like in our notebook, is the most natural way.

I give an example.

a:=2

b:=a+7=9

The upper example is accepted by mathcad.

Then why Mathcad cannot accept this:

y:=(x+1)^2:=x^2+2*x+1

is like to give a small detail for the path of equations exposed.

For mathcad processor the routine is simple:

if find a second ":=" in equation, then keep the last member of equality to be equal with the first

Why should I write 2 times a equation inside mathcad to obtain a result.

Other Example:

t:=a+3

z:=t^2

z:=a^2+6*a+9

For this simple case i dont need to use mathcad processor and hardware resources, i just have to be able to write directly as below:

t:=a+3

z:=t^2:=a^2+6*a+9

Mathcad will understand last equation as being z:=a^2+6*a+9 (second equal take all task of the previous equal, so remain kept first and last terms, intermediary are skip)

Why cannot be implemented this? Is a problem of flexibility.

This rule is not in contradiction with any mathematical rule, and also not contradict even with just Mathcad source code.

For complicated cases indeed is necessary to use the command expand. But for simple cases is not necessary, when just I have in mind the result and i can expose it to detail equation in a cognitive way.

So, in my opinion Mathcad code have to be upgraded for some cases where is problem of flexibility.

19-Tanzanite
July 8, 2010

Those are not equalities, they are assignments. The second assignment would attempt to assign one expression to another expression. That is not allowed, because it is meaningless.

Mathcad has two processors, numeric and symbolic, that are largely separate. It has assignment, local assignment, numeric evaluation, symbolic evaluation, and equality operators.

Here's a very brief tutorial.

tubar1-VisitorAuthor
1-Visitor
July 8, 2010

Indeed, asignments. Then Mathcad need a bit of more flexibility about this.

If meet 2 asignments in a equation, then have to take as being assignment between first and last term, intermediary being skipped. Why cannot be possible this? Is a generalisation. Who want to use the way I propose, he can do with a lot of shortcuts that will obtain in shorting the work, and who dont want, can use the classical way that Mathcad did by now.

My proposal not contradict with Mathcad approach that did by now. My proposal generalize the existing aproach.

Is the principle of Black Box: take in consideration input and output - so if more than one assignment in a equation, then keep first and last term (equality between first and last term)

Please, open your mind, dont be only programmer

19-Tanzanite
July 8, 2010
Is the principle of Black Box: take in consideration input and output - so if more than one assignment in a equation, then keep first and last term (equality between first and last term)

And allow someone to insert whatever they want in the middle term, no matter if it's completely wrong and misleading? Sorry, but I don't think that's a good idea at all

Please, open your mind, dont be only programmer

Who said I'm a programmer? I'm a physicist.

tubar1-VisitorAuthor
1-Visitor
July 8, 2010

all that from mathematics can be exposed in a notebook, Mathcad have to be able too. So to be more flexible when interact with human.

All Mathcad releases was done in aim to be closed to human thinking. So also my proposal go in the way to request a more flexibility from the Mathcad code in a specific problem that does not contradict with mathematics and also not with Mathcad code.

My proposal is a generalisation of the approaches that Mathcad need to do

tubar1-VisitorAuthor
1-Visitor
July 8, 2010

other example:

t:=a+b

y:=t^2+1

result by "expand option" that y:=a^2+b^2+2*a*b+1

Then why i need mathcad processor to do that, and to consume processing resources of computer, in order to get that final form z:=a^2+b^2+2*a*b+1, and to define a intermediary variable y. I have already the result in mind. And I want to be able to write directly in Mathcad:

y:=t^2+1:=a^2+b^2+2*a*b+1

Why cannot be possible for this simple case ? Indeed for complicated cases I need to use classical path by using common "expand"

19-Tanzanite
July 8, 2010

But you can do that. What is wrong with the way shown in the worksheet? It does exactly what you are asking for, except that it doesn't allow you to type in something for the intermediate expression that is completely wrong.

Edit: I just deleted the previous file, which was saved in Mathcad 11 format. I forgot that it doesn't allow one to hide the keywords and change the appearence of the operators for one expression. The new file is in version 14 format.