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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Tan (a*x) Result Different

paulk20050-disa
1-Newbie

Tan (a*x) Result Different

Hello, my name is Paul,

I am new to Mathcad 14 and this user forum.

I am using Mathcad to support my learning of mathmatics. Currently I am learning from text books, that are very good, and explain the material well. But I tend to get a little lost when trying to find the 3rd or 4th derivative of a function. The math usually takes up a sheet of A4 or more. So I use mathcad to get a result in order to prove that I have done the differentiation correctly.

But I am having problems with getting Mathcad to return the result in the same format as the book answer. I have attached the worksheet I am using, can somebody tell me where I am going wrong?

With reference to the attached xmcd file.

When I differentiate the above function i get this...

2.Tan(2.x)^2+2

But the book answer is this...

2.Sec(a.x)^2

I realize both are correct answers, but I would like to get the same result as the book. The book has used a substitution during solving.

Cos(a.x)^2 + Sin(a.x)^2 = 1

Hopefully somebody can help me, thank you in advance.

Paul
36 REPLIES 36

On 2/12/2009 11:19:46 AM, rijackson wrote:
>You can force Mathcad to go
>through your procedure.
>(Except the final conversion
>to sec2, anyway)
>
>Richard
_____________________________

That's pretty convincing about the bracketing error, mentioned several times.



At least,we all agree on the Mathcad procedure, the paper/pencil procedure and the identities, all that to please the user and economize the threads.

jmG



In support of my previous assertion about equivalent formulas, here is an example of two of them. The 2nd one is the solution to the Verhulst DE. In maths, there are lot of conjectures, i.e: something you just take. No CAS can manipulate conjectures. Don't ask any CAS to deliberate about any of Fermat theorems, they won't.

The irony is that Fermat was not recognized as "Mathematician".
Oh ! there maybe some twist in these two formulas.


jmG

Don't worry about so many corrections, they were all needed as you can see more collabs got trapped. The Chain rule is in fact a summation that the user corrects in the writing like I did. It is most important that rule is clear, otherwise it will re-appear on the day you will have to integrate over the chain rule. It will have a domino effect on DE's !

So, you had two mistakes:

1. the bracketing
2. the chain rule

As far as your question:
Mathcad is correct, your book is wrong (or your typo).

jmG

Thank you to everybody who has contributed. Especially to Richard who defended my original question through out.

jmg, I imagine you have written, helped develop the Mathcad software? true or false? and would therefore defend it to the day you die?

I can appreciate that, but that does nothing for my confidence. I am not at your level of understanding, and was hoping that Mathcad would help me to unravel the mysteries of math. I am a keen student and willing to learn and go that extra mile.

But if I am learning from a book, then I want to be able to follow along and feel part of the process. While I'm sure every argument you present is sound and would no doubt be backed up by your peers. For a simpleton like me it does not help matters.

Is there no way that Mathcad can be made to make substitutions? in this case sec^2 for 1/cos^2.

Yes more pain!! but isn't that what this forum is for, to help make Mathcad gurus of us all so that we can spread the word ;-D

Take it easy... and try not to blow a gasket. 😄

On 2/21/2009 1:04:30 PM, paulk20050 wrote:
...
>jmg, I imagine you have
>written, helped develop the
>Mathcad software? true or
>false? and would therefore
>defend it to the day you die?

==> I never wrote anything for Mathcad .
==> If my recollection is correct, you wanted d/dx[tan(x)], which Mathcad gives directly but you wanted going through pain and prestige of what you did. Then your bracketing was incorrect and it toke quite a while for many to admit. Then I made my point that your book though right is incorrect as well as your final answer as you switch the domains. I never claimed your answer was wrong/invalid... simply pointed "incorrect" because you have introduced an identity before the next algebraic step that is to simplify/reduce.

That case is not too detrimental but symbolic CAS do follow the rules ... symbolic is "Advanced Algebra" that follows rules as well as "rules of domains".

>Is there no way that Mathcad
>can be made to make
>substitutions? in this case
>sec^2 for 1/cos^2.

==> It would have to follow unknown rules.
sec� is implicit of the complex domain and will expand in the complex domain as well as in the tan(x) domain. For your question I take the answer from Mathcad. Look for more in your book or expect more from collabs. Mathcad is not a handbook.



Make sure you give your carpenter the right tan(x) domain for the roof. Otherwise you might just get a rabbit hutch and will be your fault in the court room !

jmG

No one here is a Mathcad developer. The only person from PTC (or Mathsoft) who posts at all regularly is Mona. And she generally stays well away from the technical discussions. If you don't understand everyuthing jmG says, don't worry about it. Neither do I.

You have to remember that Mathcad is primarily a numeric processor, designed for numeric evaluations. There is limited access to Maple (or, more recently, MuPad) functionality in the symbolic processor. In general it provides sufficient tools for you to be able to set up for a numeric solution. Things like being able to calculate a Jacobian for use in a Newtonian iteration scheme.

Also remember that simplicity is in the eye of the beholder. Whether sec² or 1/cos² is simpler is a matter of taste. From the standpoint of a CAS, or even manual algebraic manipulations, there is much to be said for the latter -- the fewer different functions are actually used, the easier it is to combine and cancel terms, and to spot simplifying identities. The former, however, is easier to typeset, and so may be preferred for a printed book.

Don't even expect all textbooks to agree on the "best" form. And the best form often depends on further usage. For the derivative of the tangent, the form 1+tan² has the distinct advantage of not introducing any additional trigonometric function, and is the form required for calculating the derivative of tan-1.

As a matter of substitution, you can always use the substitute keyword. This keyword is not limited to substituting for a simple variable, but can substitute for an expression. Thus you can substitute 1/sec(x) for cos(x). But be warned -- substitution for expressions is based on an exact match, and the internal representation of a subexpression is not always what you might expect from the external display form. And there is no guarantee that it will not later decide that 1/cos(x) is simpler than sec(x) and do that substitution as part of a simplify keyword (or sometimes even as part of evaluation).
__________________
� � � � Tom Gutman

Paul,

If you read the other reply:

>Don't even expect all textbooks to agree on the "best" form. And the best form often depends on further usage. For the derivative of the tangent, the form 1+tan� has the distinct advantage of not introducing any additional trigonometric function, and is the form required for calculating the derivative of tan-1 <.

....
you can easily figure that tan(x) being an already evaluated numerical approximation, squaring and adding 1 is quite a clean and fast operation vs launching a new approximation for cos� switching not only the math domain but also the numerical approximation domain with an extra about 25 more arithmetic operations and numerization that comes with it too.

And ironically, the numerical approximation for tan(x) is faster than cos(x). Paul, I made my best to help you, no to lose you. Hopefully you get some benefit. I have another point: in modern maths, very many functions relate to other ones ... relations to tan(x), tan(x)� are by far more abundant.

jmG
Top Tags