Post Reply 
trig representation
10-06-2017, 11:19 AM
Post: #1
trig representation
Trig functions can produce displayed results that are not immediately obvious as equivalent to an expected result:

Example:
int(x*sec(x^2),x);

This example produces quite a lot of solution terms, and even when simplified, the result looks quite complicated:

ln(((ABS(sin(x^2)^2+2*sin(x^2)+1))/(ABS(sin(x^2)^2-2*sin(x^2)+1))))/8

Given the example input, how/can the result be simplified to this form(?): (1/2)*ln(ABS(sec(x^2)+tan(x^2)))

In general, is there a way to represent trig expressions in more compact terms, other than the trigx commands trigsin(), trigcos(), or trigtan()? A new command that would allow for trig compaction, like tcompact(expr,[function]), would allow students to more readily match results otherwise achieved by hand. Let me be among the first to request it!

-Dale-
Find all posts by this user
Quote this message in a reply
10-06-2017, 03:43 PM
Post: #2
RE: trig representation
The best way to check a result obtained by hand with the calc answer is check if simplify of the difference returns 0.
Find all posts by this user
Quote this message in a reply
10-07-2017, 11:05 AM
Post: #3
RE: trig representation
(10-06-2017 03:43 PM)parisse Wrote:  The best way to check a result obtained by hand with the calc answer is check if simplify of the difference returns 0.

I'm having trouble with this one, and it may be something I have overlooked:

(int(x*sec(x^2),x)) - ((1/2)*ln(ABS(sec(x^2)+tan(x^2))) ); // Doesn't return 0.

This is merely the difference between the integral result and the result obtained by hand. If I haven't made an error, is the difference due to round off or something?

The calc results are rather obscure, and I don't readily see the hand result matching the calc result.
Find all posts by this user
Quote this message in a reply
10-07-2017, 02:14 PM (This post was last modified: 10-07-2017 03:31 PM by Arno K.)
Post: #4
RE: trig representation
I made a plot of both, they seem to be the same, now I start trying by Hand.
Arno
P.S. If you want it quick and dirty: take the result from the Prime and yours and make an equation, use Binoms in the calc-result and get out the 2 from the exponents, multiply by 4 and take the resultimg two in the ln of your result, omit ln from both sides, you should now have \[abs(\frac{sin(z)+1}{sin(z)-1})=abs(\frac{(1+sin(z))^2}{(cos(z))^2})\] Put the abs on both sides on denominator as well as nominator, multiply crosswise and divide by \(abs(sin(z)+1)\), you have now \[abs((cos(z)^2)=abs((1+sin(z))*(sin(z)-1))\]Inside abs sin(z)-1 is the same as 1-sin(z) and because of \(sin(z)^2+cos(z)^2=1\) you are done. But how to make the calc show that, I don't know as I usually do things like that by hand.
Arno
Find all posts by this user
Quote this message in a reply
10-07-2017, 06:10 PM
Post: #5
RE: trig representation
It's not straightforward, mainly because of the absolute values.
f:=exp(lncollect(numer(int(x*sec(x^2),x) - 1/2*ln(abs(sec(x^2)+tan(x^2))))))
Then remove the abs value by hand (since the arguments are both - or +) and simplify returns 1.
Find all posts by this user
Quote this message in a reply
10-08-2017, 11:15 AM (This post was last modified: 10-08-2017 01:11 PM by DrD.)
Post: #6
RE: trig representation
The original integral:
calculator:=int(x*sec(x^2),x);

Substitution:
let u=x^2; then:
du=2xdx
dx=du/2x

The integral becomes:
(1/2)*∫(x*sec(u),u)
oopsie correction: (1/2)*∫(sec(u),u) my copy and paste error, sorry! Thanks Arno!

pencil:=1/2)*ln(ABS(sec(x^2)+tan(x^2)));

Parisse suggested:
Quote:The best way to check a result obtained by hand with the calc answer is check if simplify of the difference returns 0.

calculator-pencil ≠0
(calculator==pencil) ==> 0, false


This test fails, as does the equivalence operators. Taking the difference, simplified or not, between the calculator result, and the manual result, isn't zero. affirm({calculator, pencil})?
Find all posts by this user
Quote this message in a reply
10-08-2017, 11:46 AM
Post: #7
RE: trig representation
(10-08-2017 11:15 AM)DrD Wrote:  The integral becomes:
(1/2)*∫(x*sec(u),u)
Must be:
(1/2)*∫(sec(u),u)
Arno
Find all posts by this user
Quote this message in a reply
10-08-2017, 12:06 PM
Post: #8
RE: trig representation
The best way to check an antiderivative is to run simplify(diff(anti)-f). That will remove absolute values introduced in logarithms and also eat the constant of integration.
There are several equivalent ways to write an expression, especially when inverse trig functions or ln are involved and it's not necessarily easy to move from one to another. If you know an algorithm to do so, I'd be happy to know it.
And keep in memory that the giac integration algorithm is not a table lookup in US textbooks exercices question/answers.
Find all posts by this user
Quote this message in a reply
10-08-2017, 01:40 PM
Post: #9
RE: trig representation
Thanks for that, Parisse. I have made a note in my guide for that!

I don't know of any better algorithms. A simple, consistent answer is all I can hope for with the prime CAS. I have learned that math education is not the same world wide. I used to think that math was a universal language! Imagine ... a representation of math was used on the golden records that NASA earthlings sent out into space on the Voyager spacecraft. If we have these math differences here on earth, how will universal interpretations ever have much hope of succeeding? I guess the fact that *anything* shows up on the records will set extra-terrestrial minds to wondering. (I know the hp prime sometimes makes me wonder)!
Find all posts by this user
Quote this message in a reply
10-10-2017, 02:33 PM
Post: #10
RE: trig representation
(10-08-2017 01:40 PM)DrD Wrote:  Thanks for that, Parisse. I have made a note in my guide for that!

I don't know of any better algorithms. A simple, consistent answer is all I can hope for with the prime CAS. I have learned that math education is not the same world wide. I used to think that math was a universal language! Imagine ... a representation of math was used on the golden records that NASA earthlings sent out into space on the Voyager spacecraft. If we have these math differences here on earth, how will universal interpretations ever have much hope of succeeding? I guess the fact that *anything* shows up on the records will set extra-terrestrial minds to wondering. (I know the hp prime sometimes makes me wonder)!

Don't worry, the golden records will be unplayable for the aliens since long ago they moved on to mp3s and destroyed the last turntable years ago.

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
10-10-2017, 04:13 PM
Post: #11
RE: trig representation
(10-10-2017 02:33 PM)toml_12953 Wrote:  Don't worry, the golden records will be unplayable for the aliens since long ago they moved on to mp3s and destroyed the last turntable years ago.

http://time.com/3663568/vinyl-sales-increase/

Actually, its been going up recently... Big Grin

TW

Although I work for HP, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
10-10-2017, 07:43 PM
Post: #12
RE: trig representation
(10-10-2017 02:33 PM)toml_12953 Wrote:  Don't worry, the golden records will be unplayable for the aliens since long ago they moved on to mp3s and destroyed the last turntable years ago.

Good news! Carl Sagen already thought of that ... foreshadowing the revival of record players. He also figured the aliens would like the gold records so well, they will do double light speed just to get here, so they can get their tentacles on one of George Jones 16 Greatest Hits, platinum editions! It's a great way for them to 'space out' while they're trippin'
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)