Express trigonometric expression assuming condition letter

24 Views Asked by At

Which is the syntax that allows to evaluate this expression in funtion of k

If
$$Tan[310] = k$$ evaluate this expression in funtion of k $$\frac{Sin[320]-Cos[310]}{Tan[140]+Cot[220]}$$ edit : let $$Tan[310]=k$$ an example for $$Cot[220] =Cot[180+40]=Cot[40]=tan[50]$$ but $$k=tan[310]=-tan[360-310]=-tan[50]$$ ==> $$Cot[220]=-k$$

edit 2 I solve by hand this expression $$\frac{Sin[320]-Cos[310]}{Tan[140]+Cot[220]}$$ with $$Tan[310]=k$$ came to $$\frac{2k\sqrt{k^{2}+1}}{k^{4}-1}$$ came to but it is very tedious as an achievement that mathematica throw this result for this problem and for other longer?

1

There are 1 best solutions below

1
On

Edit

Routine, that works for the given case.

eqs = {Tan[310 Degree] == k, 
      (Sin[320 Degree]-Cos[310 Degree])/(Tan[140 Degree] + Cot[220 Degree])==a}

eqs2 = eqs // TrigToExp

(*   {(I (E^(-40 I \[Degree]) + E^(40 I \[Degree])))/(
       E^(-40 I \[Degree]) - E^(40 I \[Degree])) == k, 
-((I (E^(-40 I \[Degree]) - E^(40 I \[Degree])))/(-((
 I (E^(-40 I \[Degree]) - E^(40 I \[Degree])))/(
 E^(-40 I \[Degree]) + E^(40 I \[Degree]))) - (
I (E^(-40 I \[Degree]) + E^(40 I \[Degree])))/(
E^(-40 I \[Degree]) - E^(40 I \[Degree])))) == a}   *)

eli = Eliminate[
        eqs2 /. (E^(-40 I \[Degree]) -> 1/c) /. (E^(40 I \[Degree]) ->c), c]

(*    (-4 - a^2) k^2 - a^2 k^4 + a^2 k^6 == -a^2   *)

sol=Solve[eli, a]

(*   {{a -> -((2 k)/Sqrt[1 - k^2 - k^4 + k^6])}, 
      {a -> (2 k)/Sqrt[1 - k^2 - k^4 + k^6]}}      *)

Some information got lost by Eliminate. Only the last is a valid solution.

eqs /. First@sol // Reduce

(*   False   *)

eqs /. Last@sol // Reduce

(*   k == -Cot[40 Degree]   *)