Message Boards Message Boards

0
|
9664 Views
|
5 Replies
|
4 Total Likes
View groups...
Share
Share this post:

code for solution of 2 algebraic equations

Posted 12 years ago
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.

Thanks


if any body can help me
POSTED BY: farid khattak
5 Replies
Posted 11 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) - 
    k12/(Cmu*
       k1/eps1/Sqrt[
        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
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
Posted 12 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: Greg Hurst
Posted 12 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: Greg Hurst
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
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract