Re: How to solve a simple Trig cofunction?
- To: mathgroup at smc.vnet.net
- Subject: [mg50547] Re: [mg50500] How to solve a simple Trig cofunction?
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Thu, 9 Sep 2004 05:19:25 -0400 (EDT)
- Reply-to: hanlonr at cox.net
- Sender: owner-wri-mathgroup at wolfram.com
soln = Reduce[
{Cos[x+4]==Sin[3x+2],
0<=x<=Pi/2},x]
x == (1/2)*(-3 + 2*Pi - 2*ArcTan[1 + Sqrt[2]])
To convert to degrees:
soln /. a_?NumericQ :> a/Degree //
FunctionExpand
x == (90*(-3 + 2*Pi - 2*ArcTan[1 + Sqrt[2]]))/Pi
%//N
x == 26.556330730376516
Select[NSolve[Cos[x+4]==Sin[3x+2], x],
0<=(x/.#)<=Pi/2&] /.
a_?NumericQ :> a/Degree
{{x -> 26.55633073037652}}
Bob Hanlon
>
> From: bfeeny at mac.com (Brian Feeny)
To: mathgroup at smc.vnet.net
> Date: 2004/09/08 Wed AM 05:14:59 EDT
> To: mathgroup at smc.vnet.net
> Subject: [mg50547] [mg50500] How to solve a simple Trig cofunction?
>
> 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
>
>