Message Boards Message Boards

code for solution of 2 algebraic equations

hello dears

i am new to the mathematica forum as well as to using mathematica.
i am a phd student and have developed a mathematical model, now needing the help of you guys in finding a solution
2cos θ1 - 1.5sin θ1 = 0.08 ( (cos θ2)^2 )- 0.08( (sin θ2)^2 )+(.05)/θ1 (cos ( θ1/2))     (1)
2sin θ1 + 1.5cos θ1 = 2(0.08 cos θ2 sin θ2)+ sin(θ1/2)                                   (2)

This is a set of 2 equations with two unknowns, θ1 and θ2.
If somebody can help me to solve this seemingly easy system but i have unsuccessfully tried a lot.


if any body can help me
POSTED BY: farid khattak
4 years ago
The first step is to write both equations in Mathematica's syntax. For example:
2sin θ1+1.5cos θ1=2(.08cos θ2 sin θ2)+ sin(θ1/2)
Should be:
2 Sin[theta1]+ 1.5 Cos[theta1] == 2(0.08 Cos[theta2] Sin[theta2])+Sin[theta1/2]
If you are new to using Mathematica, you will want a general overview before using it. Please see the Mathematica Virtual Book for an introduction to the correct syntax.

Once you have both equations written out, you can try giving it to a function such as Solve or NSolve.
POSTED BY: Sean Clarke
4 years ago
I don't think this system has a solution (over the reals). If we define
f[θ_, ψ_] := 2 Cos[θ] - 1.5 Sin[θ] - 0.08 Cos[ψ]^2 + 0.08 Sin[ψ]^2 - 0.05 Cos[θ/2]/θ
g[θ_, ψ_] := 2 Sin[θ] + 1.5 Cos[θ] - 0.16 Cos[ψ] Sin[ψ] - Sin[θ/2]
then we'd like to know where 
f[θ, ψ] == g[θ, ψ] == 0
If we plot all three functions, it appears they don't simultaneously intersect.
Plot3D[{f[x, y], g[x, y], 0}, {x, -10, 10}, {y, -10, 10}]
POSTED BY: Chip Hurst
4 years ago
Hello Mr. Chip Hurst

actually, the angles theta 1 and theta 2 written above are functions of time t.

and i need to solve them as function of time for onward plotting.
 i hope, you will keep on trying to find out any way for this issue.
thanks anyway.
POSTED BY: Muhammad Farid
4 years ago
Regardless of whether these are functions of time or not, the plot suggests choosing any value for θ1 and θ2 will not satisfy the system.

i.e. suppose for t = 1, θ1[1] = x and θ2[1] = y, then the plot suggests 
f[x, y] == g[x, y] == 0
is not satisfied.
POSTED BY: Chip Hurst
4 years ago

Hi everyone, I am trying to solve 4 coupled algepraic equations...but seems like sth is wrong ... I wrote a code with Solve function but Mathematica seems like running but not getting the solution! I have 4 unknowns (k1,eps1,k2 and k12 other than these 4 are constant numbers) and 4 equations.. Thanks for any help! The code is:

Solve[{((-Cmu*k1^2/eps1)^2*S^2) + (x12/taux12)*(-2*k1 + k12) - eps1 == 
   0,       -Ceps2*eps1^2/k1 - Ceps1*2*S*k1 + 
    2*(Cmu*k1^2/eps1)^2*S^2 + 
    Ceps3*(eps1/k1)*(x12/taux12)*(-2*k1 + k12) == 
   0, -1/taux12*(-2*k2 + k12) + (e^2 - 1)*
     k2/(3*dp*(Sqrt[2*Pi/3*k2])/(24*alpha2*g0)) == 
   0, -1/taux12*((1 + x12)*k12 - 2*x12*k2 - 2*k1) - 
        1 + 0.45*(3*Ur^2/2*k1)]) - ((k12*(Cmu*
          k1/eps1/Sqrt[1 + 0.45*(3*Ur^2/2*k1)])*S^2)/3) == 0}, {k1, 
  eps1, k2, k12}, Cubics -> False, Quartics -> False]
POSTED BY: Recep Kahraman
3 years ago

Group Abstract Group Abstract