Skip to main content
Best answer by Werner_E

@kenan2 wrote:

I don't understand how the equation can have different solutions when in the solution manuel is the answer: 53.1 deg.



The pure mathematical problem you posed first (the equation with trig functions) has an infinity number of solutions. But for your application I'd guess that only solutions in the range 0° to 90° (or 0 to pi/2) are physically relevant. So you have to tell Mathcad that you are only interested in solutions within that range. Trivially theta=0 is a "solution" to your problem, too, as Luc has explained, but sure not the solution you had in mind.

 

Then is seems you gave a wrong equation in your very first post with a superfluous factor 2. This equation would give you an angle of 69.44 °.

The equations you posted later seems to be the correct one.

So use this second equation, tell Mathcad via assumptions that you only are interested in solution within the aforementioned range and let Mathcad show the result in degree rather than the default radian and you get what you are looking for.

B.png

 

1 reply

25-Diamond I
July 3, 2018

Don't only post a picture - additionally post you worksheet as it makes it easier for us to play around with and show you with your exact example what we are talking about.

 


@kenan2 wrote:

Hi.

How can i solve for the angle and get it into a number not a matrix?


Your solution ARE numbers, but as there are more than one, Prime combines them in a vector.

Your equations has an infinite number of solutions. Mathcad shows you the three within the range [-pi; pi].

How should Prime know which of the solutions is the one you need if you don't tell it?

 

1) You may assign the outcome of the symbolic solve to a variable -> sol:=.... and then access the solution which is suitable for your application via vector index, e.g. theta := sol[2

 

2) You may use the assume modifier to only get the solution you are looking for, maybe like "assume, -pi<theta<-pi/2"

 

3) You may use a numeric solve block instead of the symbolic solve. Here you can apply additional constraints (like theta<0 or the like) and also control the outcome by using different guess values.

 

BTW, its expected of you that you come back to a question you asked and close the thread (e.g. by marking an answer as being correct or by assuming the question to be answered. And its not wrong to let people know if their answer had helped.

-> https://community.ptc.com/t5/PTC-Mathcad-Questions/Isolate/m-p/552340

-> https://community.ptc.com/t5/PTC-Mathcad-Questions/massflow-rate/m-p/549645

 

B.png

kenan21-VisitorAuthor
1-Visitor
July 3, 2018

hmm.. Do not understand 😕

Can Mathcad Prime not reduce it like that (SEE PICTURE). 

 

25-Diamond I
July 3, 2018

@kenan2 wrote:

hmm.. Do not understand 😕


You have to be more precise as to what it is  that you don't understand

 


Can Mathcad Prime not reduce it like that (SEE PICTURE). 


I hope - NO!     😉

1) In your first line you already have lost a factor 2 as sin(2x)=2*sin x cos x

2) In your second line you divide by sin theta and so you are loosing all solutions which are multiples of pi ( ...,-pi, 0, pi, 2 pi, ...)

3) In your third line you divide by cos theta. Fortunately cos theta = 0 is no solution to your original equation. Nevertheless whenever you divide you have to make sure that you don't divide by zero.

4) arctan 4/3 = 53.31° is just one out of an infinite number of solutions of the equation tan x = 4/3. You may add (or subtract) any integer multiple of pi -> tan x = 4/3 => x = arctan (4/3)+ k*pi with k in Z.

 

But Prime's symbolics is far away from being perfect and the solution Prime is presenting to you sure could be simplified but muPad (the symbolics in Prime) seems not to be to convinced to do so.

The solutions to your equations are:

a) any integer multiple of pi -> k*pi with k in Z

b) arctan(8/3) + k * pi with k in Z

 

The expression Prime gives you is more complicated but its perfectly equivalent.

 

And at last again: Your equation has an infinity number of solutions. If you expect a specific one (maybe 69.444°) you will have to tell Prime so (e.g. via the assume statement). If you want to see the angle)s= in degree, you simply have to type deg or ° in the placeholder after the result values. Using the degree character ° is more complicated in  Prime than it is in real Mathcad - you can't use the keyboard to type it in but must chose it from the "Units" dropdown.

As you can see in the picture Prime delivers the very same result in a quite different notation if we rewrite the equation with tan functions before we solve it. I was not able, though, to convince Prime to simple give us atan(8/3) which would be the most simple way to write that solution.

B.png