Skip to main content
1-Visitor
July 11, 2017
Question

Solve for Angle in Radians

  • July 11, 2017
  • 4 replies
  • 7006 views

Hi,

I have an expression like:

 

tan (alpha) - alpha = 0.48

where 'alpha' is angle in radians, and want to calculate the Value of Alpha.

 

How to solve this using Mathcad?

 

Pl Help!

 

Regards,

Shashank

 

4 replies

23-Emerald IV
July 11, 2017
Set a guess value first:
alpha:=1
Then use the root solver:
alpha:=root (tan (alpha)-alpha-0.48,alpha)
To display the result:
alpha=

Success!
Luc
21-Topaz II
July 11, 2017

Hi ssharma,

 forssharma.jpg

25-Diamond I
July 11, 2017

You have to be aware that your task has an infinite number of soltions:Pic1.pngYou may use the symbolics but you will always get the very same solution even if you use something like the "assume" command to limit alpha to a certain range. An old bug in the symbolics.Pic2.png

 So you will have to resort to numerical methods and you have the choice amongst two.

The "root" command usually works pretty well and there are two ways of using it - provinding an interval or providing a guess value. Usually different guesses would give you different solutions, but in case of your equation we get the very same result most of the times - crazy.Pic3.pngThe other numeric method is using a solve block with "Find". Here again you have to provide a guess value which seems to have more impact on the outcome this timePic4.png

 

 

 

 

 

 

 

 

 

 

 

24-Ruby IV
July 11, 2017

3-Find.png

25-Diamond I
July 11, 2017

Has anybody an explanation for the different solutions Valery and I get with the guesses 3 and -5?

I am using Prime 3.0 and TOL is by default 10^-3.

Valery sure used a newer version at which setting of TOL?

19-Tanzanite
July 11, 2017

I get the following in MC15:

 

tantest.PNG

I can't explain the difference between the implicit and explicit vectorisations!

 

TOL is the default 10^-3; however, setting it much tighter didn't alter anything.

 

Alan 

 

25-Diamond I
July 11, 2017

Interesting effects we experience here.

Here is a nother one (done in MC15). I always thought that "root" would use the same LM algorithm as "Find" in the solve block (not in Prime as here we have the Knitro algorithms). Obviously root works in a different way, not sure how. Most of the times we get 0,966. Only with some selected guess values we get a different result.

The algorithm in the solve block for "Find" was set to "Levenberg-Marquardt" (default). "Conjugate Gradient" and "Quasi Newton" give the very same result with exception of guess value 0 - here "Conjugate Gradient" returns 0,966 and no errror.Pic1.png

 

 

 

 

24-Ruby IV
July 12, 2017

alpha.png