1
$\begingroup$

Is it possible to solve these equations together ? PS:I am new to Mathematica Here are the equations

The only unknowns are theta 1 and alpha 1 , you can consider the rest constants I am using this

Reduce[{
   y == ArcTan[(3000 - 30*Sin[2 x + 0.0093] - 30^2/(4*3000))/(30 + 
       30 Cos[2 x + 0.0093]), 
   x == (Pi/2 - 0.0093 - y)/2]
}, {x, y}] 

but it returns an error requiring exact values

$\endgroup$
  • $\begingroup$ Is a1 same as alpha1 ? $\endgroup$ – Lotus May 1 '17 at 5:42
  • $\begingroup$ yes it is , sorry for that $\endgroup$ – Abdallah Ayman May 1 '17 at 6:06
  • $\begingroup$ There was a syntax issue with your code. Also, FindRoot is best if you are ok with numerical results. FindRoot[{y == ArcTan[(3000 - 30*Sin[2 x + 0.0093] - 30^2/(4*3000))/(30 + 30 Cos[2 x + 0.0093])], x == (Pi/2 - 0.0093 - y)/2}, {{x, 1}, {y, 1}}] $\endgroup$ – Lotus May 1 '17 at 6:19
  • $\begingroup$ Thank you for the answer ! I just forgot to copy that syntax error fixed. $\endgroup$ – Abdallah Ayman May 1 '17 at 6:43
4
$\begingroup$

Yes, the equations can be solved in MMA. Equation solving is an advanced subject. Here is one approach for solving the equations:

eqn = Tan[θ] == (f - r Sin[π/2 - θ] - z)/(x + r Cos[π/2 - θ])
    eqn = eqn /. α -> (π/2 - θ - ω)/2
    eqn = eqn /. f -> g + z
    soln = Solve[eqn, θ] // Simplify

    (*  {{θ -> ConditionalExpression[
    ArcTan[(g*r - Sqrt[x^2*(g^2 - r^2 + x^2)])/(g^2 + x^2), 
      -((r*x^2 + g*Sqrt[x^2*(g^2 - r^2 + x^2)])/
       (g^2*x + x^3))] + 2*Pi*C[1], 
    Element[C[1], Integers]]}, 
 {θ -> ConditionalExpression[
    ArcTan[(g*r + Sqrt[x^2*(g^2 - r^2 + x^2)])/(g^2 + x^2), 
      -((r*x^2 - g*Sqrt[x^2*(g^2 - r^2 + x^2)])/
       (g^2*x + x^3))] + 2*Pi*C[1], 
    Element[C[1], Integers]]}}  *)

Explanation: In the first line we write our equation. Note the use of single = and double == signs. In the second line we replace all of $\alpha$'s with the expression we have. In the third line we replace the variable $f$ with $g+z$. In the fourth line, we solve for $\theta$.

Where did $g$ come from? First, we solved the equation without $g$ and got an even more complicated expression. We recognized that $f^2-2fz+z^2$ appeared several places in the solution and thought it would be simpler to write that part as some $g^2$. So, we tried it and it worked -- we did get a simpler expression. Try it without the third step and see which one you prefer.

We got 2 different expressions for the solution and each on them involves an arbitrary constant, C[1], which must be an integer. So there are an infinite number of solutions.

MMA has put the solution in terms of an arctangent function with 2 arguments. Those two arguments are $x, y$, not $y, x$.

$\endgroup$
  • $\begingroup$ This (π/2 - θ - ω) should be (π/2 - θ - ω)/2? $\endgroup$ – zhk May 1 '17 at 7:27
  • $\begingroup$ @zhk Thank you! I have updated the code and the MMA solution. Good catch, Z. $\endgroup$ – LouisB May 1 '17 at 7:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.