Author 
Comment/Response 
jm

03/10/05 09:26am
I am trying to do the following:
I have 3 equations:
f[theta, thetafield] = Bres*Cos[thetafieldtheta]  4*PI*Meff*Cos[2*theta] (1)
g[theta, thetafield] = Bres*Cos[thetafieldtheta]  4*PI*Meff*(Cos[theta])^2 (2)
and
Bres*Sin[thetafieldtheta]  4*PI*Meff*Sin[2*theta] = 0 (3)
(4*PI*Meff and Bres are just parameters, and the variables are theta and thetafield)
The purpose is to write the functions f and g as a function of Bres and Meff only for each angle thetafield ranging from 0 to PI/2
The idea is to use equation (3) at first in order to get the solution theta for different thetafield.
My script is as follow:
BEGIN
h[theta_] := Bres*Sin[thetafieldtheta]  4*PI*Meff*Sin[2*theta];
For [thetafield==0, thetafield<PI/2, thetafield+=1,
{
Solve [f[theta]==0, theta]
}]
END
The problem with this script is that I can’t label each solution for each thetafield, and therefore use them in Equation 1 and 2.
The Mathematica output is a series of solutions in bracket.
I would need a script that enables to find solutions theta of (3) for different thetafield.
For example, something like
thetafield=Pi/10, Theta1=……,
thetafield=Pi/5, Theta2=…...
Etc…
Then, enter those solutions and the value of thetafield in (1) and (2)….and finally have f and g as a function of Bres, Meff at fixed thetafield value.
Thanx for your help
URL: , 
