MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to solve a simple Trig cofunction?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg50532] Re: [mg50500] How to solve a simple Trig cofunction?
  • From: Brian Feeny <bfeeny at mac.com>
  • Date: Thu, 9 Sep 2004 05:18:10 -0400 (EDT)
  • References: <NDBBJGNHKLMPLILOIPPOGENGECAA.djmp@earthlink.net>
  • Sender: owner-wri-mathgroup at wolfram.com

David,

Thanks, I am learning alot from the multiple ways people here have 
helped me with this problem.
I am confused however, why DrBob and Andrzej came up with ~26 degrees, 

but you came up with 21
(which is what I came up with).  I mean, even with a conversion from 
radians (more accurate) to degrees
(probably less accurate), I would think Mathematica would not show such 

a large difference in the ways
this was solved.

Brian

On Sep 8, 2004, at 10:57 AM, David Park wrote:

> Brian,
>
> It's often best to work with radians, but since your input is simply 

> stated
> in degrees we'll stick with degrees. You can click in the Degree 
> symbol from
> the Input Palette to save some typing.
>
> With a problem like this, it's often useful to make a plot first to 

> see what
> is going on.
>
> Plot[{Cos[x =B0 + 4=B0], Sin[3x =B0 + 2=B0]}, {x, -180, 180},
>     Frame -> True,
>     ImageSize -> 450];
>
> Then NSolve gets the solutions right off. (But you have to use "==" 

> not "="
> in the equation.)
>
> NSolve[Cos[x =B0 + 4=B0] == Sin[3x =B0 + 2=B0], x]
> {{x -> -159.}, {x -> -134.}, {x -> -69.}, {x -> 21.}, {x -> 46.}, {x ->
> 111.}}
>
> You can ignore the error message in this case since the solutions 
> correspond
> to the plot.
>
> If you use Ted Ersek's RootSearch package from MathSource you can 
> easily
> obtain the roots over a wider range.
>
> Needs["Enhancements`RootSearch`"]
>
> RootSearch[Cos[x =B0 + 4=B0] == Sin[3x =B0 + 2=B0], {x, -360, 
360}]
> {{x -> -339.}, {x -> -314.}, {x -> -249.}, {x -> -159.}, {x -> -134.},
>   {x -> -69.}, {x -> 21.}, {x -> 46.}, {x -> 111.},
>   {x -> 201.}, {x -> 226.}, {x -> 291.}}
>
> David Park
> djmp at earthlink.net
> http://home.earthlink.net/~djmp/
>
> From: Brian Feeny [mailto:bfeeny at mac.com]
To: mathgroup at smc.vnet.net
>
> Lets say I have:
>
> cos[X+4] = sin[3X+2]
>
> What would be the proper way to solve the above, for X, in
> Mathematica, with the answer in degrees?
>
> I did this, but something tells me their has to be a better way:
>
> NSolve[Cos[X Degree +4 Degree] = Sin[3 X Degree+2 Degree], X]
>
> I mean, I wish i didn't have to enter "Degree"so many times, perhaps
> their is a simple way to just tell it the whole thing is in Degree.
>
> Additionally, is their a way to constrain the above to 90 > X > 0?  I
> tried doing like:
>
> NSolve[Cos[X Degree +4 Degree] = Sin[3 X Degree+2 Degree], X /; 90
>> X>0]
>
> but that obviously is not the right way since that doesn't work.
> Appreciate all the help.
>
> Brian
>
>
>
>
------------------------------------------------------------------------

------
Brian Feeny, CCIE #8036, CISSP    	e: signal at shreve.net
Network Engineer           			p: 318.213.4709
ShreveNet Inc.             			f: 318.221.6612



  • Prev by Date: Re: Exact real numbers
  • Next by Date: Re: Re: plot thousands(?) of trajectories in single graph.
  • Previous by thread: Re: How to solve a simple Trig cofunction?
  • Next by thread: Re: Re: How to solve a simple Trig cofunction?