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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. 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

Mathcad is not designed to do what you want. It is primarily a numeric calculator with a symbolic processor bolted on, mainly as a means of developing equations for the numeric processor. Your ability to obtain any particular form of an answer is very limited.

To make matters worse, MC14 has a brand new symbolic processor. It will probably take a few releases to work the kinks out of it.
__________________
� � � � Tom Gutman

There are algebraic transformations that no CAS (Computer Algebra System) can do. The book answer maybe totally correct or totally incorrect. An example of totally incorrect book style is the polynomial format: a0 + a1*x + a2*x� ...
Though this format is generally acceptable, it is not on the principle. If your book shows the Lagrange iterated product, that's the right mathematical form of the polynomial. There was work sheet on that last year, but don't recollect the approximate date.

There should be some trig transform in your Mathcad version.

jmG

The book answer is a standard derivative that is given in all modern math text books.

Is there no way in which i can make Mathcad give the result I want?

Here is the text book method for differentiating Tan(x), sorry dont want to teach anybody to suck eggs, just want to know if there is some way I could solve using Mathcad, in the same method as used below?

Tan(x) = Sin(x)/Cos(x)

So diff Sin(x)/Cos(x)

Let u = sin(x) therefore du/dx = cos(x)

Let v = cos(x) therefore dv/dx = -sin(x)

Now dy/dx = (v)(du/dx)-(u)(dv/dx)/v^2

Therefore dy/dx = (cos(x))(cos(x))-(sin(x))(-sin(x))/cos(x)^2

Therefore dy/dx = cos(x)^2 + sin(x)^2/cos(x)^2

now cos(x)^2 + sin(x)^2 = 1

Therefore dy/dx = 1/cos(x)^2 = sec(x)^2

Thank you

Paul

I don't think so, not generally.

But, since you've already determined that the answers are equivalent, just look on it as some extra exercises for the reader.

TTFN,
Eden

"Here is the text book method for differentiating Tan(x), sorry don't want to teach anybody to suck eggs, just want to know if there is some way I could solve using Mathcad, in the same method as used below ?"
_______________________

Your book is wrong and Mathcad correct.



jmG

Please review your suite and find out why your book is wrong and Mathcad correct. That 1/cos(x)� is equals 1+tan(x)^2 that is not the point because 1/cos(x)� can't come out of the derivative suite.



So, work it ou again.

jmG

On 2/11/2009 7:01:19 PM, jmG wrote:
>Please review your suite and
>find out why your book is
>wrong and Mathcad correct.
>That 1/cos(x)� is equals
>1+tan(x)^2 that is not the
>point because 1/cos(x)� can't
>come out of the derivative
>suite.
>
>
>
>So, work it ou again.
>
>jmG

1+tan2 = [cos2 + sin2]/sin2

TTFN,
Eden

On 2/11/2009 7:25:09 PM, eden_mei wrote:
>On 2/11/2009 7:01:19 PM, jmG wrote:
>>Please review your suite and
>>find out why your book is
>>wrong and Mathcad correct.
>>That 1/cos(x)� is equals
>>1+tan(x)^2 that is not the
>>point because 1/cos(x)� can't
>>come out of the derivative
>>suite.
>>
>>
>>
>>So, work it out again.
>>
>>jmG
>
>1+tan2 = [cos2 + sin2]/sin2
>
>TTFN,
>Eden
_____________________

I repeat :

>>That 1/cos(x)� is equals 1+tan(x)^2
>>that is not the point because
>>1/cos(x)� can't come out of the
>>derivative suite.



Q.E.D ,,, end.

jmG

No idea what your point is... You argue against something and the go and prove it.

TTFN,
Eden

On 2/11/2009 10:05:39 PM, eden_mei wrote:
>No idea what your point is...
>You argue against something
>and the go and prove it.
>
>TTFN,
>Eden
____________________________

I have replied to the collab wrongdoing in there

http://collab.mathsoft.com/read?120462,16e#120462

and highlighted the error with the red bracket, to confirm Mathcad result is correct , the collab is wrong and your result is out of the track in your reply :

On 2/11/2009 7:01:19 PM, jmG wrote:
>Please review your suite and
>find out why your book is
>wrong and Mathcad correct.
>That 1/cos(x)� is equals
>1+tan(x)^2 that is not the
>point because 1/cos(x)� can't
>come out of the derivative
>suite.
>
>
>
>So, work it ou again.
>
>jmG

1+tan2 = [cos2 + sin2]/sin2

TTFN,
Eden

Can you see your error ? as to your reply above.
"1+tan2 = [cos2 + sin2]/sin2"



I suspected the collab wanted a clear cut tutoring.

jmG

Paul,

Can you see your error ?
at the message posted above in this thread.

The result you are giving comes from another demonstration and it slept badly in the writing of your book. The result you are giving comes from deriving tan(x) via the Delta method 1/cos(x)�. That it is an identity to [1+tan(x)�] is true, but 1/cos(x)� does not come out of the development you have attempted.

Please feel free to come back for help.

jmG

On 2/12/2009 1:04:38 AM, jmG wrote:
>Paul, Can you see your error ?

==> work sheet attached

>jmG



RichardJ
19-Tanzanite
(To:ptc-1368288)

On 2/12/2009 1:04:38 AM, jmG wrote:
>Paul,
>
>Can you see your error ?


Hopefully not, because he hasn't made an error.

Richard

On 2/12/2009 8:44:59 AM, rijackson wrote:
>On 2/12/2009 1:04:38 AM, jmG wrote:
>>Paul,
>>
>>Can you see your error ?
>
>
>Hopefully not, because he hasn't made an
>error.
>
>Richard
_________________________

On 2/11/2009 7:25:09 PM, eden_mei wrote:
>1+tan2 = [cos2 + sin2]/sin2
>
>TTFN,
>Eden
.........................

In the context of the help in this thread:
1+tan(x)� = [cos(x)� + sin(x)�]/sin(x)�

Mathcad denies such an erroneous assertion.



jmG



RichardJ
19-Tanzanite
(To:ptc-1368288)

On 2/12/2009 10:35:38 AM, jmG wrote:
>On 2/12/2009 8:44:59 AM, rijackson
>wrote:
>>On 2/12/2009 1:04:38 AM, jmG wrote:
>>>Paul,
>>>
>>>Can you see your error ?
>>
>>
>>Hopefully not, because he hasn't made an
>>error.
>>
>>Richard

I was referring to what Paul wrote, which has no error. I agree that Eden's is in error (should be cos2 on the bottom).

Richard

Yes, cos^2

I was more focussed on deleting some comments that would have incurred "private correspondence"

TTFN,
Eden

On 2/12/2009 11:22:19 AM, rijackson wrote:
...
>I was referring to what Paul wrote,
>which has no error. I agree that Eden's
>is in error (should be cos2 on the
>bottom).
>
>Richard
________________________

You overlooked Paul's error that you proved afterwards.



All that pain was necessary and done in good harmony.

jmG

>>Hopefully not, because he hasn't made an error.<<

Not quite true. In the post where he does the derivation he was sloppy with the parenthesization in one step, resulting in an expression that is formally wrong. Fairly obvious and easy to fix, and the rest of the derivation is based on the correct parenthesization (rather than what was written), so I consider the error innocuous. But it is there.

On another note, do you really think that telling jmG the facts will make a difference? Or are we dealing with the triumph of hope over experience?
__________________
� � � � Tom Gutman

On 2/12/2009 1:14:49 PM, Tom_Gutman wrote:
>>>Hopefully not, because he hasn't made an error.<<
>
>Not quite true. In the post
>where he does the derivation
>he was sloppy with the
>parenthesization in one step,
>resulting in an expression
>that is formally wrong.
>Fairly obvious and easy to
>fix, ...>__________________
>� � � � Tom Gutman
____________________________

The fix was done, in red but was ignored.
Nicely enough Mathcad confirmed my bracketing.

jmG



RichardJ
19-Tanzanite
(To:ptc-1368288)

On 2/12/2009 1:26:28 PM, jmG wrote:

>The fix was done, in red but was
>ignored.

I completely missed it. You should have stated "the parentheses are wrong".

Sometimes, one word is worth a thousand pictures 🙂

Richard

RichardJ
19-Tanzanite
(To:TomGutman)

On 2/12/2009 1:14:49 PM, Tom_Gutman wrote:

>Not quite true. In the post
>where he does the derivation
>he was sloppy with the
>parenthesization in one step,
>resulting in an expression
>that is formally wrong.
>Fairly obvious and easy to
>fix, and the rest of the
>derivation is based on the
>correct parenthesization
>(rather than what was
>written), so I consider the
>error innocuous. But it is
>there.

True, I did notice that. The error is carried through 3 consecutive lines. Since he got to the correct answer I viewed it as a typo rather than a math error, but if I was marking it for a grade it would have to cost some points.

>On another note, do you really
>think that telling jmG the
>facts will make a difference?
>Or are we dealing with the
>triumph of hope over
>experience?

We are dealing with the failure of both hope and experience.

Richard

On 2/12/2009 2:00:01 PM, rijackson wrote:
...
>True, I did notice that. The error is
>carried through 3 consecutive lines.
>Since he got to the correct answer I
>viewed it as a typo rather than a math
>error, but if I was marking it for a
>grade it would have to cost some points.

>We are dealing with the failure of both
>hope and experience.
>
>Richard
.....................
>>On 2/12/2009 1:14:49 PM, Tom_Gutman wrote:
>>On another note, do you really
>>think that telling jmG the
>>facts will make a difference?
.....................

Yes Richard,

it would cost some points and the fact the result must be in the domain called by the user is most important for the future of the user [eventually ?]. No matter if it does not make any difference vis the trig identities. Identities like the trig, do confuse domains. In more advanced applied maths like in servomechanism, the maths CAN"T confuse domains. If it would be so, we would still be before Cauchy and the concept of domains and thing going either within, out, or around and all sorts of shapes. And that was not enough, more adventures are needed to arrive at some results.

Some collabs might have found boring reading and wondering who is going to square the moon. Read the Cauchy theory as applied and discover Mathcad finds that Int[-a,b] of 1/x has the "Cauchy Principal Value = 0 . It does not hesitate between � infinity.

"Deceptively simple or simply deceptive" ?

However we all did a good job with pain and prestige.

jmG

On 2/12/2009 1:04:38 AM, jmG wrote:
>Paul,
>
>Can you see your error ?
>at the message posted above in
>this thread.
>
>The result you are giving
>comes from another
>demonstration and it slept
>badly in the writing of your
>book. The result you are
>giving comes from deriving
>tan(x) via the Delta method
>1/cos(x)�. That it is an
>identity to [1+tan(x)�] is
>true, but 1/cos(x)� does not
>come out of the development
>you have attempted.
>
>Please feel free to come back
>for help.
>
>jmG

No errors on your part, Paul:

tan = sin/cos, so d(tan)/dx = d(sin/cos), which results in cos2 from the chain rule.

TTFN,
Eden

On 2/12/2009 10:19:56 AM, eden_mei wrote:
...
>No errors on your part, Paul:
>
>tan = sin/cos, so d(tan)/dx =
>d(sin/cos), which results in cos2 from
>the chain rule.
>
>TTFN,
>Eden
__________________________

Paul is incorrect at the red.
The chain rule he started ends 1 + tan(x)^2
The matter is not about trig identities,
the matter is to correct the chain rule,
doing so, Mathcad agrees with the chain rule.



jmG




RichardJ
19-Tanzanite
(To:ptc-1368288)

On 2/12/2009 11:56:24 AM, jmG wrote:

>Paul is incorrect at the red.
>The chain rule he started ends 1 +
>tan(x)^2

It can end either way! Both forms are right! Paul's question was whether or not you can force Mathcad to give a specific answer.

Richard

On 2/12/2009 12:01:41 PM, rijackson wrote:
>On 2/12/2009 11:56:24 AM, jmG wrote:
>
>>Paul is incorrect at the red.
>>The chain rule he started ends 1 +
>>tan(x)^2
>
>It can end either way! Both forms are
>right! Paul's question was whether or
>not you can force Mathcad to give a
>specific answer.
>
>Richard
____________________________

You are damned right Richard.
The original task is Dtan(x),
that's why I ended at the blue,
where tan(x) appears [1 + tan(x)�]

jmG



On 2/12/2009 12:01:41 PM, rijackson wrote:
>On 2/12/2009 11:56:24 AM, jmG wrote:
>
>>Paul is incorrect at the red.
>>The chain rule he started ends 1 +
>>tan(x)^2
>
>It can end either way! Both forms are
>right! Paul's question was whether or
>not you can force Mathcad to give a
>specific answer.
>
>Richard

I think that you start repeating the argument is when it's time to pack it in.

TTFN,
Eden
RichardJ
19-Tanzanite
(To:IRstuff)

On 2/12/2009 3:36:16 PM, eden_mei wrote:

>I think that you start repeating the
>argument is when it's time to pack it
>in.

Pain. Give me more pain!

😉


Richard


You can force Mathcad to go through your procedure. (Except the final conversion to sec2, anyway)

Richard
Top Tags