Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

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

Search the Archive

Conditional FindRoot iteration Question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg115443] Conditional FindRoot iteration Question
  • From: "Lea Rebanks" <lrebanks at netvigator.com>
  • Date: Tue, 11 Jan 2011 06:57:29 -0500 (EST)

Dear Sir / Madame,

Given the following values & functions 					
=> The below equality is TRUE when the value "XX" = 0.15
Unfortunately it is also TRUE for other values of 'XX'.
=> BUT when the value of 'XX' = 0.15 then the value of  (Mod[p1[time], 360]
+ M) = 45 degree modular 360 position.
Other values of 'XX' that result TRUE to the equality DO NOT have the same
modular 360 position.
=>  Therefore. Assuming I DO NOT know the value of "XX". I am trying to
setup a functional method to calculate the value of "XX" to equal 0.15.
AND  having (Mod[p1[time], 360] + M) = 45 degree modular 360 position.. 
(The 45 degree is important to be included in the function / formula.)
Presumably I need to use either Solve or FindRoot or Reduce. ( I found by
using FindRoot I could achieve a result of 0.25502999699238926 for 'XX'
which does provide the 93312 on the rhs of the equality, but does NOT give
the 45 degree modular 360 position, ( which is good & means I can isolate
the 0.15 value of "XX" by including 45 degree modular 360 position in the
function.)
=>  Therefore the QUESTION :-
Please could someone show me the code to achieve the above to Find / Solve
for the value 'XX' to equal 0.15 
with (Mod[p1[time], 360] + M) = 45 included as a condition in the function.

In plain English =>  Solve[ equation with (value 'XX' = ??unknown??)= =
93312 AND Mod [ total degrees, 360] = 45.
Result output => { XX = 0.15 }

Any help or advice greatly appreciated. (FYI - I am using version 6
Mathematica.)
Many thanks for your attention.
Best regards,
Lea Rebanks...
***************************************************************************

(Sin[(If[360<=M1,180-45-(90-360-(Mod[p1[time],360]+M)),
If[0<=M1<90,180-45-(90-(Mod[p1[time],360]+M)),
If[90<=M1<180,180-45-(180-(Mod[p1[time],360]+M)),
If[180<=M1<270,180-45-(270-(Mod[p1[time],360]+M)),
If[270<=M1<360,180-45-(360-(Mod[p1[time],360]+M)),0]]]]])*Degree]*(\[Sqrt]((
Abs[spYaxis[p1[time]]])^2+(Abs[spXaxis[p1[time]]])^2))/(Sin[45*Degree])*Sqrt
[2])^2==93312.00000000004`
(Mod[p1[time],360]+M)
Clear[XX]
XX = 0.15
Clear[value1]
value1=2.85
Clear[value2]
value2=3.85
Clear[M]
M=N[Pi/4 /Degree,10];
M=N[Pi/4 /Degree,10]
Clear[M1]
M1=Mod[p1[time],360]+M;
M1
Clear[p1]
p1[t_]:=(t*3*360)*(value1+XX)
p1[3]
Clear[spYaxis]
spYaxis[\[Theta]_]:=((1/360)*\[Theta])*(((value2+XX))*Sqrt[2])*Sin[(\[Theta]
+M)*Degree]
Clear[spXaxis]
spXaxis[\[Theta]_]:=((1/360)*\[Theta])*(((value2+XX))*Sqrt[2])*Cos[(\[Theta]
+M)*Degree]
Clear[C33]
C33=If[360<=M1,180-45-(90-360-(Mod[p1[time],360]+M)),
If[0<=M1<90,180-45-(90-(Mod[p1[time],360]+M)),
If[90<=M1<180,180-45-(180-(Mod[p1[time],360]+M)),
If[180<=M1<270,180-45-(270-(Mod[p1[time],360]+M)),
If[270<=M1<360,180-45-(360-(Mod[p1[time],360]+M)),0]]]]]
Clear[time]
time=3
(Sin[(If[360<=M1,180-45-(90-360-(Mod[p1[time],360]+M)),
If[0<=M1<90,180-45-(90-(Mod[p1[time],360]+M)),
If[90<=M1<180,180-45-(180-(Mod[p1[time],360]+M)),
If[180<=M1<270,180-45-(270-(Mod[p1[time],360]+M)),
If[270<=M1<360,180-45-(360-(Mod[p1[time],360]+M)),0]]]]])*Degree]*(\[Sqrt]((
Abs[spYaxis[p1[time]]])^2+(Abs[spXaxis[p1[time]]])^2))/(Sin[45*Degree])*Sqrt
[2])^2
(Mod[p1[time],360]+M)

***************************************************************************
Any help or advice greatly appreciated. (FYI - I am using version 6
Mathematica.)
Many thanks for your attention.
Best regards,
Lea Rebanks...
***************************************************************************




  • Prev by Date: Re: FindInstance does not abort with TimeConstrained
  • Next by Date: Re: FittedModel Objects... How does Mathematica do it?
  • Previous by thread: Re: Turning Derivative into Function (Newbie Question)
  • Next by thread: CUDADot[] does not work with rectangular matrices