Exact solution for "simple" trig equation

2,342 views
Skip to first unread message

Fred Nurk

unread,
Oct 18, 2010, 2:04:20 AM10/18/10
to tinspire
Hello,

Is anyone able to solve cos(x) + sin(2x) = 0 between 0 and 2pi on the
ti-nspire (providing the exact solutions)? Shouldn't graphics
calculators be able to solve linear-looking trigonometric equations?

Even cos(x) + cos(pi/2 - 2x) = 0 and 1 - 2[sin(x/2)]^2 + sin(2x) = 0
fail miserably.

TIA,
Fred

Nelson Sousa

unread,
Oct 18, 2010, 5:29:59 AM10/18/10
to tins...@googlegroups.com

try using texpand and then solve.
by the way, what does "linear looking trigonometric equation"?

and no, there are no general algorithms. But it wouldn't hurt to get acquainted with the Nspire cas instead of supposing all equations you can't solve are a limitation of the calculator.

Cheers,

--
Nelson

> --
> To post to this group, send email to tins...@googlegroups.com
> To unsubscribe send email to tinspire+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com.au/group/tinspire?hl=en-GB?hl=en-GB
> The tns documents shared by group members are archived at
> http://lafacroft.com/archive/nspire.php

Message has been deleted

sinz54

unread,
Oct 18, 2010, 7:10:06 PM10/18/10
to tinspire


On Oct 18, 5:29 am, Nelson Sousa <nso...@gmail.com> wrote:
> try using texpand and then solve.
> by the way, what does "linear looking trigonometric equation"?
>
> and no, there are no general algorithms. But it wouldn't hurt to get acquainted with the Nspire cas instead of supposing all equations you can't solve are a limitation of the calculator.
>
> Cheers,
>
> --
> Nelson

That will work, but not too well:

Using "texpand" and then "factor", you get the equation
(2*sin(x) +1) * cos(x) = 0
Save that as variable eq.

Then if you enter
solve(eq and x >=0 and x <= 2* pi, x)

the Nspire CAS returns a bizarre hodgepodge answer:

x = (2*n1-1)*pi/2 and (1 <= 2*n1)-1 <=4 or x = 7*pi/6 and n2 = 0 or x
= 11*pi/6 and n2=1

where n1 and n2 are generated integer variables.

There are a couple of things that are odd about this "result,"
including the strange inequality
(1 <= 2*n1)-1 <=4
which is a Diophantine equation since n1 must be an integer.

(You can solve it for n1 by adding the constraint
n1 = int(n1) -- meaning n1 must be an integer
the solution set is {1,2})

and the fact that the generated integer variable n2 isn't used
anywhere in the solution set of x. (It's likely used if you solved
the equation without the constraints 0 <=x <= 2*pi; with those
constraints, some parts of the total solution set are eliminated.)

Putting constraints on the allowed range of x produces generated
integer variables like n1 that themselves are constrained to be in a
certain range. And that's as far as the NSpire CAS can go by itself.
Then you have to add the constraint that these variables are integers
to solve those inequalities too.



-- Steven L.

Wayne

unread,
Oct 18, 2010, 8:58:08 PM10/18/10
to tinspire
Why not simply enter the following:

solve(texpand(cos(x)+sin(2x))=0,x) to see directly that the solutions
are
1. the odd multiples of pi/2,
2. 7pi/6 plus the multiples of 2pi and
3. -pi/6 plus the multiples of 2pi.

Solutions between 0 and 2pi are then pi/2, 3pi/2, 7pi/6 and 11pi/6.

Wayne

Nelson Sousa

unread,
Oct 18, 2010, 9:24:34 PM10/18/10
to tins...@googlegroups.com
there are several reasons why different procedures give different results.

most notably, solve( equation and x<a,x) is very different from solve(equation,x)|x<a.

in the first situation you're solving two conditions, therefore applying a set of algoritgms to simplify the eqs, maybe get some matrix to describe the system. you'll have all sorts of constraints about what is generally true and what isn't. on the second case, you solve one equation, and not a very hard one as it's easily factored, then constraint your results to a specific interval. The rules are very different from a computational point of view.

One key aspect of cas systems: algorithms fail. And have limitations. Go for simple unless absolutely necessary.

Orherwise you end up like those guys that started with 1+1, then went on to things like cos^2(x)+sin^2(x)=sum(1/2^n,n,1,infinity) and went on until they got a 3 line formula.

-
Nelson

sinz54

unread,
Oct 19, 2010, 12:13:33 PM10/19/10
to tinspire


On Oct 18, 9:24 pm, Nelson Sousa <nso...@gmail.com> wrote:
> there are several reasons why different procedures give different results.
>
> most notably, solve( equation and x<a,x) is very different from solve(equation,x)|x<a.
>
> in the first situation you're solving two conditions, therefore applying a set of algoritgms to simplify the eqs, maybe get some matrix to describe the system. you'll have all sorts of constraints about what is generally true and what isn't. on the second case, you solve one equation, and not a very hard one as it's easily factored, then constraint your results to a specific interval. The rules are very different from a computational point of view.
>
> One key aspect of cas systems: algorithms fail. And have limitations. Go for simple unless absolutely necessary.
>
> Orherwise you end up like those guys that started with 1+1, then went on to things like cos^2(x)+sin^2(x)=sum(1/2^n,n,1,infinity) and went on until they got a 3 line formula.
>
> -
> Nelson

This problem is not limited to the Ti NSpire CAS. CAS systems don't
have artificial intelligence to intuit the best way to solve a
mathematical problem.

In the 1970s and 1980s, I used to use Macsyma, which was one of the
first really powerful CAS systems. But even with Macsyma, you
couldn't hope to just call the "solve" function to solve an equation
and always expect to get an elegant closed-form solution--even if one
existed.

In this case, once you have called "texpand" and "factor" to transform
the equation to

(2*sin(x) +1) * cos(x) = 0

it should be obvious by inspection what the roots of this equation are
between 0 and 2*pi. Or, if you insist, call
solve (2*sin(x) + 1 = 0,x) and
solve (cos(x)=0,x)

You're better off quitting while you're ahead!



-- Steven L.

Nelson Sousa

unread,
Oct 19, 2010, 1:46:37 PM10/19/10
to tins...@googlegroups.com
I'm sorry, I must have missed the whole point of the discussion here.

What's wrong with solve(tExpand(cos(x)+sin(2*x))=0,x)|0≤x≤2*π, that
returns x=π/2 or x=7*π/6 or x=3*π/2 or x=11*π/6 without any issues,
unnecesary manipulations, extra considerations or approximations?


Nelson

Reply all
Reply to author
Forward
0 new messages