Convert trigonometric expression into other forms using just a specific set of identities

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












I am trying to convert a trigonometric expression like



sinθ/(1 - cosθ)


into



cosecθ + cotθ


or



(1 + cosθ)/sinθ


Basically, I want to change the original expression to something different. However, I am only allowed to use these 7 relations:



sin^2θ + cos^2θ = 1
1 + tan^2θ = sec^2θ
1 + cot^2θ = cosec^2θ
sinθ = 1/cosecθ
cosθ = 1/secθ
tanθ = 1/cotθ
tanθ = sinθ/cosθ


I am not allowed to use any other trigonometric identities besides these seven to transform the expression.



Ideally, I would like to be able to tell Mathematica to take the first expression and change it into another expression which contains only cosecθ and cotθ.



However, if that is not possible, I would like Mathematica to convert the original expression into different variations by only using those 7 identities.







share|improve this question















  • 1




    In MMA use: Sin[θ] Not sinθ?
    – Mariusz Iwaniuk
    22 hours ago











  • @MariuszIwaniuk Thanks for the input. :) Actually, I haven't written anything in MMA yet. I was just stating the problem I am facing here so I didn't use the proper syntax.
    – iKnowNothing
    22 hours ago














up vote
2
down vote

favorite












I am trying to convert a trigonometric expression like



sinθ/(1 - cosθ)


into



cosecθ + cotθ


or



(1 + cosθ)/sinθ


Basically, I want to change the original expression to something different. However, I am only allowed to use these 7 relations:



sin^2θ + cos^2θ = 1
1 + tan^2θ = sec^2θ
1 + cot^2θ = cosec^2θ
sinθ = 1/cosecθ
cosθ = 1/secθ
tanθ = 1/cotθ
tanθ = sinθ/cosθ


I am not allowed to use any other trigonometric identities besides these seven to transform the expression.



Ideally, I would like to be able to tell Mathematica to take the first expression and change it into another expression which contains only cosecθ and cotθ.



However, if that is not possible, I would like Mathematica to convert the original expression into different variations by only using those 7 identities.







share|improve this question















  • 1




    In MMA use: Sin[θ] Not sinθ?
    – Mariusz Iwaniuk
    22 hours ago











  • @MariuszIwaniuk Thanks for the input. :) Actually, I haven't written anything in MMA yet. I was just stating the problem I am facing here so I didn't use the proper syntax.
    – iKnowNothing
    22 hours ago












up vote
2
down vote

favorite









up vote
2
down vote

favorite











I am trying to convert a trigonometric expression like



sinθ/(1 - cosθ)


into



cosecθ + cotθ


or



(1 + cosθ)/sinθ


Basically, I want to change the original expression to something different. However, I am only allowed to use these 7 relations:



sin^2θ + cos^2θ = 1
1 + tan^2θ = sec^2θ
1 + cot^2θ = cosec^2θ
sinθ = 1/cosecθ
cosθ = 1/secθ
tanθ = 1/cotθ
tanθ = sinθ/cosθ


I am not allowed to use any other trigonometric identities besides these seven to transform the expression.



Ideally, I would like to be able to tell Mathematica to take the first expression and change it into another expression which contains only cosecθ and cotθ.



However, if that is not possible, I would like Mathematica to convert the original expression into different variations by only using those 7 identities.







share|improve this question











I am trying to convert a trigonometric expression like



sinθ/(1 - cosθ)


into



cosecθ + cotθ


or



(1 + cosθ)/sinθ


Basically, I want to change the original expression to something different. However, I am only allowed to use these 7 relations:



sin^2θ + cos^2θ = 1
1 + tan^2θ = sec^2θ
1 + cot^2θ = cosec^2θ
sinθ = 1/cosecθ
cosθ = 1/secθ
tanθ = 1/cotθ
tanθ = sinθ/cosθ


I am not allowed to use any other trigonometric identities besides these seven to transform the expression.



Ideally, I would like to be able to tell Mathematica to take the first expression and change it into another expression which contains only cosecθ and cotθ.



However, if that is not possible, I would like Mathematica to convert the original expression into different variations by only using those 7 identities.









share|improve this question










share|improve this question




share|improve this question









asked 22 hours ago









iKnowNothing

375




375







  • 1




    In MMA use: Sin[θ] Not sinθ?
    – Mariusz Iwaniuk
    22 hours ago











  • @MariuszIwaniuk Thanks for the input. :) Actually, I haven't written anything in MMA yet. I was just stating the problem I am facing here so I didn't use the proper syntax.
    – iKnowNothing
    22 hours ago












  • 1




    In MMA use: Sin[θ] Not sinθ?
    – Mariusz Iwaniuk
    22 hours ago











  • @MariuszIwaniuk Thanks for the input. :) Actually, I haven't written anything in MMA yet. I was just stating the problem I am facing here so I didn't use the proper syntax.
    – iKnowNothing
    22 hours ago







1




1




In MMA use: Sin[θ] Not sinθ?
– Mariusz Iwaniuk
22 hours ago





In MMA use: Sin[θ] Not sinθ?
– Mariusz Iwaniuk
22 hours ago













@MariuszIwaniuk Thanks for the input. :) Actually, I haven't written anything in MMA yet. I was just stating the problem I am facing here so I didn't use the proper syntax.
– iKnowNothing
22 hours ago




@MariuszIwaniuk Thanks for the input. :) Actually, I haven't written anything in MMA yet. I was just stating the problem I am facing here so I didn't use the proper syntax.
– iKnowNothing
22 hours ago










1 Answer
1






active

oldest

votes

















up vote
6
down vote



accepted










First, as already noted in the comment by Mariusz Iwaniuk, you should learn the correct MMA notation. MMA understands cosecθ as a variable whose name has six letters: c, o, s, e, c, θ. Humans understand that you meant Csc[θ], but MMA is not that advanced.



Second, think of how you would do it by hand. Since you want results containing only Csc[θ] and Cot[θ], you should rewrite your identities so that Csc[θ] and Cot[θ] are in the right hand side. You leave in the left hand side those expression that you want to eliminate. Out of your 7 original identities, I translated 6:



$sin (θ)=sqrt1-cos ^2(θ)$



$tan (θ)=sqrtsec^2(θ)-1$



$sin (θ)=frac1csc (θ)$



$sec (θ)=frac1cos(θ)$



$tan (θ)=frac1cot (θ)$



$tan (θ)=fracsin(θ)cos (θ)$



Your 3rd identity relates cotangent and cosecant. Since you want them both in the answer, there is no point in using it. If you wanted the answer only in terms of say cosecant, then that 3rd identity would be useful to eliminate the cotangent (or viceversa).



Now, blindly replacing identities might not lead you to an expression with only the functions you want. For the particular way of re-writing the identities above, the following graph shows that you might end up with expressions containing Csc[θ]. That is because you can reach the "csc" node using the Sin[θ] == 1 / Csc[θ] and you have no way of it.



enter image description here



Fortunately, we can use MMA to rewrite those rules so that only cosecant and cotangent are in the right hand side. But we will have to prevent MMA to use its internal simplification rules. That is accomplished with the code below:



Solve[
(*sinθ^2+cosθ^2==1,*)
1 + tanθ^2 == secθ^2,
(*1+cotθ^2==cosec^2θ,*)
sinθ == 1/cosecθ,
cosθ == 1/secθ,
tanθ == 1/cotθ(*,
tanθ==sinθ/cosθ*),
sinθ, cosθ, tanθ, secθ]


Note that instead of using the correct notation Sin[θ], I have used sinθ. That way, we force MMA to solve a set of algebraic equations where the symbols sinθ, cosθ, etc. are not functions of θ. Also, note that I have commented out 3 equations. Since you want to solve for 4 variables, you only need 4 equations. With practice, you learn which equations to comment out. For now, let us say that you use trial and error. There are two sets of solutions depending on the sign you pick on front of the square root. Using those replacement lists you can cast any trigonometric expression as an expression on cotangents and cosecants.



$lefttextsinθto frac1textcosecθ,textcosθto -fractextcotθsqrt1+textcotθ^2,texttanθto frac1textcotθ,textsecθto -fracsqrt1+textcotθ^2textcotθright$



$lefttextsinθto frac1textcosecθ,textcosθto fractextcotθsqrt1+textcotθ^2,texttanθto frac1textcotθ,textsecθto fracsqrt1+textcotθ^2textcotθright$



At this point you might complain that those replacement lists are not the original identities. But now, we know that we need only four equations and we know how the final replacements should look like. That was the main point of the previous two paragraphs: finding the necessary equations (instead of using all 7 identities).



Repeated replacements of the following rules will yield the answer. Note that we are to use sin instead of Sin so that MMA does not try its built-in simplifications.



rules = 
sec[x_] :> (Print["rule 2 ", sec[x] -> Sqrt[1 + tan[x]^2]]; Sqrt[1 + tan[x]^2]),
sin[x_] :> (Print["rule 4 ", sin[x] -> 1/csc[x]]; 1/csc[x]),
cos[x_] :> (Print["rule 5 ", cos[x] -> 1/sec[x]]; 1/sec[x]),
tan[x_] :> (Print["rule 6 ", tan[x] -> 1/cot[x]]; 1/cot[x])
;


For example, if you want to cast (1 + cos[y])/sin[y] you would do



(1 + cos[y])/sin[y] //. rules





share|improve this answer





















  • Thank you very much for the detailed explanation Hector. This provided a lot of insights. :) When I run the code in Mathematica, it gives me the following result: (1 + 1/Sqrt[1 + 1/cot[y]^2]) csc[y] instead of the simplified version csc[y] + cot[y]. Is there any way to simplify the answer provided by Mathematica?
    – iKnowNothing
    17 hours ago










  • @iKnowNothing You asked for an expression in terms of cosecant and cotangent, not for its "simplified version". Getting the "simplified version" of an expression is rather complicated. Basically, you test each transformation and check where it leads to a more simplified form. Proving that those two expressions are equivalent is simple … but there is a reason why Wolfram charges you to give you step-by-step directions.
    – Hector
    17 hours ago










  • Thanks Hector. :) I have accepted as well as upvoted the answer.
    – iKnowNothing
    17 hours ago










Your Answer




StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "387"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f179535%2fconvert-trigonometric-expression-into-other-forms-using-just-a-specific-set-of-i%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
6
down vote



accepted










First, as already noted in the comment by Mariusz Iwaniuk, you should learn the correct MMA notation. MMA understands cosecθ as a variable whose name has six letters: c, o, s, e, c, θ. Humans understand that you meant Csc[θ], but MMA is not that advanced.



Second, think of how you would do it by hand. Since you want results containing only Csc[θ] and Cot[θ], you should rewrite your identities so that Csc[θ] and Cot[θ] are in the right hand side. You leave in the left hand side those expression that you want to eliminate. Out of your 7 original identities, I translated 6:



$sin (θ)=sqrt1-cos ^2(θ)$



$tan (θ)=sqrtsec^2(θ)-1$



$sin (θ)=frac1csc (θ)$



$sec (θ)=frac1cos(θ)$



$tan (θ)=frac1cot (θ)$



$tan (θ)=fracsin(θ)cos (θ)$



Your 3rd identity relates cotangent and cosecant. Since you want them both in the answer, there is no point in using it. If you wanted the answer only in terms of say cosecant, then that 3rd identity would be useful to eliminate the cotangent (or viceversa).



Now, blindly replacing identities might not lead you to an expression with only the functions you want. For the particular way of re-writing the identities above, the following graph shows that you might end up with expressions containing Csc[θ]. That is because you can reach the "csc" node using the Sin[θ] == 1 / Csc[θ] and you have no way of it.



enter image description here



Fortunately, we can use MMA to rewrite those rules so that only cosecant and cotangent are in the right hand side. But we will have to prevent MMA to use its internal simplification rules. That is accomplished with the code below:



Solve[
(*sinθ^2+cosθ^2==1,*)
1 + tanθ^2 == secθ^2,
(*1+cotθ^2==cosec^2θ,*)
sinθ == 1/cosecθ,
cosθ == 1/secθ,
tanθ == 1/cotθ(*,
tanθ==sinθ/cosθ*),
sinθ, cosθ, tanθ, secθ]


Note that instead of using the correct notation Sin[θ], I have used sinθ. That way, we force MMA to solve a set of algebraic equations where the symbols sinθ, cosθ, etc. are not functions of θ. Also, note that I have commented out 3 equations. Since you want to solve for 4 variables, you only need 4 equations. With practice, you learn which equations to comment out. For now, let us say that you use trial and error. There are two sets of solutions depending on the sign you pick on front of the square root. Using those replacement lists you can cast any trigonometric expression as an expression on cotangents and cosecants.



$lefttextsinθto frac1textcosecθ,textcosθto -fractextcotθsqrt1+textcotθ^2,texttanθto frac1textcotθ,textsecθto -fracsqrt1+textcotθ^2textcotθright$



$lefttextsinθto frac1textcosecθ,textcosθto fractextcotθsqrt1+textcotθ^2,texttanθto frac1textcotθ,textsecθto fracsqrt1+textcotθ^2textcotθright$



At this point you might complain that those replacement lists are not the original identities. But now, we know that we need only four equations and we know how the final replacements should look like. That was the main point of the previous two paragraphs: finding the necessary equations (instead of using all 7 identities).



Repeated replacements of the following rules will yield the answer. Note that we are to use sin instead of Sin so that MMA does not try its built-in simplifications.



rules = 
sec[x_] :> (Print["rule 2 ", sec[x] -> Sqrt[1 + tan[x]^2]]; Sqrt[1 + tan[x]^2]),
sin[x_] :> (Print["rule 4 ", sin[x] -> 1/csc[x]]; 1/csc[x]),
cos[x_] :> (Print["rule 5 ", cos[x] -> 1/sec[x]]; 1/sec[x]),
tan[x_] :> (Print["rule 6 ", tan[x] -> 1/cot[x]]; 1/cot[x])
;


For example, if you want to cast (1 + cos[y])/sin[y] you would do



(1 + cos[y])/sin[y] //. rules





share|improve this answer





















  • Thank you very much for the detailed explanation Hector. This provided a lot of insights. :) When I run the code in Mathematica, it gives me the following result: (1 + 1/Sqrt[1 + 1/cot[y]^2]) csc[y] instead of the simplified version csc[y] + cot[y]. Is there any way to simplify the answer provided by Mathematica?
    – iKnowNothing
    17 hours ago










  • @iKnowNothing You asked for an expression in terms of cosecant and cotangent, not for its "simplified version". Getting the "simplified version" of an expression is rather complicated. Basically, you test each transformation and check where it leads to a more simplified form. Proving that those two expressions are equivalent is simple … but there is a reason why Wolfram charges you to give you step-by-step directions.
    – Hector
    17 hours ago










  • Thanks Hector. :) I have accepted as well as upvoted the answer.
    – iKnowNothing
    17 hours ago














up vote
6
down vote



accepted










First, as already noted in the comment by Mariusz Iwaniuk, you should learn the correct MMA notation. MMA understands cosecθ as a variable whose name has six letters: c, o, s, e, c, θ. Humans understand that you meant Csc[θ], but MMA is not that advanced.



Second, think of how you would do it by hand. Since you want results containing only Csc[θ] and Cot[θ], you should rewrite your identities so that Csc[θ] and Cot[θ] are in the right hand side. You leave in the left hand side those expression that you want to eliminate. Out of your 7 original identities, I translated 6:



$sin (θ)=sqrt1-cos ^2(θ)$



$tan (θ)=sqrtsec^2(θ)-1$



$sin (θ)=frac1csc (θ)$



$sec (θ)=frac1cos(θ)$



$tan (θ)=frac1cot (θ)$



$tan (θ)=fracsin(θ)cos (θ)$



Your 3rd identity relates cotangent and cosecant. Since you want them both in the answer, there is no point in using it. If you wanted the answer only in terms of say cosecant, then that 3rd identity would be useful to eliminate the cotangent (or viceversa).



Now, blindly replacing identities might not lead you to an expression with only the functions you want. For the particular way of re-writing the identities above, the following graph shows that you might end up with expressions containing Csc[θ]. That is because you can reach the "csc" node using the Sin[θ] == 1 / Csc[θ] and you have no way of it.



enter image description here



Fortunately, we can use MMA to rewrite those rules so that only cosecant and cotangent are in the right hand side. But we will have to prevent MMA to use its internal simplification rules. That is accomplished with the code below:



Solve[
(*sinθ^2+cosθ^2==1,*)
1 + tanθ^2 == secθ^2,
(*1+cotθ^2==cosec^2θ,*)
sinθ == 1/cosecθ,
cosθ == 1/secθ,
tanθ == 1/cotθ(*,
tanθ==sinθ/cosθ*),
sinθ, cosθ, tanθ, secθ]


Note that instead of using the correct notation Sin[θ], I have used sinθ. That way, we force MMA to solve a set of algebraic equations where the symbols sinθ, cosθ, etc. are not functions of θ. Also, note that I have commented out 3 equations. Since you want to solve for 4 variables, you only need 4 equations. With practice, you learn which equations to comment out. For now, let us say that you use trial and error. There are two sets of solutions depending on the sign you pick on front of the square root. Using those replacement lists you can cast any trigonometric expression as an expression on cotangents and cosecants.



$lefttextsinθto frac1textcosecθ,textcosθto -fractextcotθsqrt1+textcotθ^2,texttanθto frac1textcotθ,textsecθto -fracsqrt1+textcotθ^2textcotθright$



$lefttextsinθto frac1textcosecθ,textcosθto fractextcotθsqrt1+textcotθ^2,texttanθto frac1textcotθ,textsecθto fracsqrt1+textcotθ^2textcotθright$



At this point you might complain that those replacement lists are not the original identities. But now, we know that we need only four equations and we know how the final replacements should look like. That was the main point of the previous two paragraphs: finding the necessary equations (instead of using all 7 identities).



Repeated replacements of the following rules will yield the answer. Note that we are to use sin instead of Sin so that MMA does not try its built-in simplifications.



rules = 
sec[x_] :> (Print["rule 2 ", sec[x] -> Sqrt[1 + tan[x]^2]]; Sqrt[1 + tan[x]^2]),
sin[x_] :> (Print["rule 4 ", sin[x] -> 1/csc[x]]; 1/csc[x]),
cos[x_] :> (Print["rule 5 ", cos[x] -> 1/sec[x]]; 1/sec[x]),
tan[x_] :> (Print["rule 6 ", tan[x] -> 1/cot[x]]; 1/cot[x])
;


For example, if you want to cast (1 + cos[y])/sin[y] you would do



(1 + cos[y])/sin[y] //. rules





share|improve this answer





















  • Thank you very much for the detailed explanation Hector. This provided a lot of insights. :) When I run the code in Mathematica, it gives me the following result: (1 + 1/Sqrt[1 + 1/cot[y]^2]) csc[y] instead of the simplified version csc[y] + cot[y]. Is there any way to simplify the answer provided by Mathematica?
    – iKnowNothing
    17 hours ago










  • @iKnowNothing You asked for an expression in terms of cosecant and cotangent, not for its "simplified version". Getting the "simplified version" of an expression is rather complicated. Basically, you test each transformation and check where it leads to a more simplified form. Proving that those two expressions are equivalent is simple … but there is a reason why Wolfram charges you to give you step-by-step directions.
    – Hector
    17 hours ago










  • Thanks Hector. :) I have accepted as well as upvoted the answer.
    – iKnowNothing
    17 hours ago












up vote
6
down vote



accepted







up vote
6
down vote



accepted






First, as already noted in the comment by Mariusz Iwaniuk, you should learn the correct MMA notation. MMA understands cosecθ as a variable whose name has six letters: c, o, s, e, c, θ. Humans understand that you meant Csc[θ], but MMA is not that advanced.



Second, think of how you would do it by hand. Since you want results containing only Csc[θ] and Cot[θ], you should rewrite your identities so that Csc[θ] and Cot[θ] are in the right hand side. You leave in the left hand side those expression that you want to eliminate. Out of your 7 original identities, I translated 6:



$sin (θ)=sqrt1-cos ^2(θ)$



$tan (θ)=sqrtsec^2(θ)-1$



$sin (θ)=frac1csc (θ)$



$sec (θ)=frac1cos(θ)$



$tan (θ)=frac1cot (θ)$



$tan (θ)=fracsin(θ)cos (θ)$



Your 3rd identity relates cotangent and cosecant. Since you want them both in the answer, there is no point in using it. If you wanted the answer only in terms of say cosecant, then that 3rd identity would be useful to eliminate the cotangent (or viceversa).



Now, blindly replacing identities might not lead you to an expression with only the functions you want. For the particular way of re-writing the identities above, the following graph shows that you might end up with expressions containing Csc[θ]. That is because you can reach the "csc" node using the Sin[θ] == 1 / Csc[θ] and you have no way of it.



enter image description here



Fortunately, we can use MMA to rewrite those rules so that only cosecant and cotangent are in the right hand side. But we will have to prevent MMA to use its internal simplification rules. That is accomplished with the code below:



Solve[
(*sinθ^2+cosθ^2==1,*)
1 + tanθ^2 == secθ^2,
(*1+cotθ^2==cosec^2θ,*)
sinθ == 1/cosecθ,
cosθ == 1/secθ,
tanθ == 1/cotθ(*,
tanθ==sinθ/cosθ*),
sinθ, cosθ, tanθ, secθ]


Note that instead of using the correct notation Sin[θ], I have used sinθ. That way, we force MMA to solve a set of algebraic equations where the symbols sinθ, cosθ, etc. are not functions of θ. Also, note that I have commented out 3 equations. Since you want to solve for 4 variables, you only need 4 equations. With practice, you learn which equations to comment out. For now, let us say that you use trial and error. There are two sets of solutions depending on the sign you pick on front of the square root. Using those replacement lists you can cast any trigonometric expression as an expression on cotangents and cosecants.



$lefttextsinθto frac1textcosecθ,textcosθto -fractextcotθsqrt1+textcotθ^2,texttanθto frac1textcotθ,textsecθto -fracsqrt1+textcotθ^2textcotθright$



$lefttextsinθto frac1textcosecθ,textcosθto fractextcotθsqrt1+textcotθ^2,texttanθto frac1textcotθ,textsecθto fracsqrt1+textcotθ^2textcotθright$



At this point you might complain that those replacement lists are not the original identities. But now, we know that we need only four equations and we know how the final replacements should look like. That was the main point of the previous two paragraphs: finding the necessary equations (instead of using all 7 identities).



Repeated replacements of the following rules will yield the answer. Note that we are to use sin instead of Sin so that MMA does not try its built-in simplifications.



rules = 
sec[x_] :> (Print["rule 2 ", sec[x] -> Sqrt[1 + tan[x]^2]]; Sqrt[1 + tan[x]^2]),
sin[x_] :> (Print["rule 4 ", sin[x] -> 1/csc[x]]; 1/csc[x]),
cos[x_] :> (Print["rule 5 ", cos[x] -> 1/sec[x]]; 1/sec[x]),
tan[x_] :> (Print["rule 6 ", tan[x] -> 1/cot[x]]; 1/cot[x])
;


For example, if you want to cast (1 + cos[y])/sin[y] you would do



(1 + cos[y])/sin[y] //. rules





share|improve this answer













First, as already noted in the comment by Mariusz Iwaniuk, you should learn the correct MMA notation. MMA understands cosecθ as a variable whose name has six letters: c, o, s, e, c, θ. Humans understand that you meant Csc[θ], but MMA is not that advanced.



Second, think of how you would do it by hand. Since you want results containing only Csc[θ] and Cot[θ], you should rewrite your identities so that Csc[θ] and Cot[θ] are in the right hand side. You leave in the left hand side those expression that you want to eliminate. Out of your 7 original identities, I translated 6:



$sin (θ)=sqrt1-cos ^2(θ)$



$tan (θ)=sqrtsec^2(θ)-1$



$sin (θ)=frac1csc (θ)$



$sec (θ)=frac1cos(θ)$



$tan (θ)=frac1cot (θ)$



$tan (θ)=fracsin(θ)cos (θ)$



Your 3rd identity relates cotangent and cosecant. Since you want them both in the answer, there is no point in using it. If you wanted the answer only in terms of say cosecant, then that 3rd identity would be useful to eliminate the cotangent (or viceversa).



Now, blindly replacing identities might not lead you to an expression with only the functions you want. For the particular way of re-writing the identities above, the following graph shows that you might end up with expressions containing Csc[θ]. That is because you can reach the "csc" node using the Sin[θ] == 1 / Csc[θ] and you have no way of it.



enter image description here



Fortunately, we can use MMA to rewrite those rules so that only cosecant and cotangent are in the right hand side. But we will have to prevent MMA to use its internal simplification rules. That is accomplished with the code below:



Solve[
(*sinθ^2+cosθ^2==1,*)
1 + tanθ^2 == secθ^2,
(*1+cotθ^2==cosec^2θ,*)
sinθ == 1/cosecθ,
cosθ == 1/secθ,
tanθ == 1/cotθ(*,
tanθ==sinθ/cosθ*),
sinθ, cosθ, tanθ, secθ]


Note that instead of using the correct notation Sin[θ], I have used sinθ. That way, we force MMA to solve a set of algebraic equations where the symbols sinθ, cosθ, etc. are not functions of θ. Also, note that I have commented out 3 equations. Since you want to solve for 4 variables, you only need 4 equations. With practice, you learn which equations to comment out. For now, let us say that you use trial and error. There are two sets of solutions depending on the sign you pick on front of the square root. Using those replacement lists you can cast any trigonometric expression as an expression on cotangents and cosecants.



$lefttextsinθto frac1textcosecθ,textcosθto -fractextcotθsqrt1+textcotθ^2,texttanθto frac1textcotθ,textsecθto -fracsqrt1+textcotθ^2textcotθright$



$lefttextsinθto frac1textcosecθ,textcosθto fractextcotθsqrt1+textcotθ^2,texttanθto frac1textcotθ,textsecθto fracsqrt1+textcotθ^2textcotθright$



At this point you might complain that those replacement lists are not the original identities. But now, we know that we need only four equations and we know how the final replacements should look like. That was the main point of the previous two paragraphs: finding the necessary equations (instead of using all 7 identities).



Repeated replacements of the following rules will yield the answer. Note that we are to use sin instead of Sin so that MMA does not try its built-in simplifications.



rules = 
sec[x_] :> (Print["rule 2 ", sec[x] -> Sqrt[1 + tan[x]^2]]; Sqrt[1 + tan[x]^2]),
sin[x_] :> (Print["rule 4 ", sin[x] -> 1/csc[x]]; 1/csc[x]),
cos[x_] :> (Print["rule 5 ", cos[x] -> 1/sec[x]]; 1/sec[x]),
tan[x_] :> (Print["rule 6 ", tan[x] -> 1/cot[x]]; 1/cot[x])
;


For example, if you want to cast (1 + cos[y])/sin[y] you would do



(1 + cos[y])/sin[y] //. rules






share|improve this answer













share|improve this answer



share|improve this answer











answered 18 hours ago









Hector

4,957933




4,957933











  • Thank you very much for the detailed explanation Hector. This provided a lot of insights. :) When I run the code in Mathematica, it gives me the following result: (1 + 1/Sqrt[1 + 1/cot[y]^2]) csc[y] instead of the simplified version csc[y] + cot[y]. Is there any way to simplify the answer provided by Mathematica?
    – iKnowNothing
    17 hours ago










  • @iKnowNothing You asked for an expression in terms of cosecant and cotangent, not for its "simplified version". Getting the "simplified version" of an expression is rather complicated. Basically, you test each transformation and check where it leads to a more simplified form. Proving that those two expressions are equivalent is simple … but there is a reason why Wolfram charges you to give you step-by-step directions.
    – Hector
    17 hours ago










  • Thanks Hector. :) I have accepted as well as upvoted the answer.
    – iKnowNothing
    17 hours ago
















  • Thank you very much for the detailed explanation Hector. This provided a lot of insights. :) When I run the code in Mathematica, it gives me the following result: (1 + 1/Sqrt[1 + 1/cot[y]^2]) csc[y] instead of the simplified version csc[y] + cot[y]. Is there any way to simplify the answer provided by Mathematica?
    – iKnowNothing
    17 hours ago










  • @iKnowNothing You asked for an expression in terms of cosecant and cotangent, not for its "simplified version". Getting the "simplified version" of an expression is rather complicated. Basically, you test each transformation and check where it leads to a more simplified form. Proving that those two expressions are equivalent is simple … but there is a reason why Wolfram charges you to give you step-by-step directions.
    – Hector
    17 hours ago










  • Thanks Hector. :) I have accepted as well as upvoted the answer.
    – iKnowNothing
    17 hours ago















Thank you very much for the detailed explanation Hector. This provided a lot of insights. :) When I run the code in Mathematica, it gives me the following result: (1 + 1/Sqrt[1 + 1/cot[y]^2]) csc[y] instead of the simplified version csc[y] + cot[y]. Is there any way to simplify the answer provided by Mathematica?
– iKnowNothing
17 hours ago




Thank you very much for the detailed explanation Hector. This provided a lot of insights. :) When I run the code in Mathematica, it gives me the following result: (1 + 1/Sqrt[1 + 1/cot[y]^2]) csc[y] instead of the simplified version csc[y] + cot[y]. Is there any way to simplify the answer provided by Mathematica?
– iKnowNothing
17 hours ago












@iKnowNothing You asked for an expression in terms of cosecant and cotangent, not for its "simplified version". Getting the "simplified version" of an expression is rather complicated. Basically, you test each transformation and check where it leads to a more simplified form. Proving that those two expressions are equivalent is simple … but there is a reason why Wolfram charges you to give you step-by-step directions.
– Hector
17 hours ago




@iKnowNothing You asked for an expression in terms of cosecant and cotangent, not for its "simplified version". Getting the "simplified version" of an expression is rather complicated. Basically, you test each transformation and check where it leads to a more simplified form. Proving that those two expressions are equivalent is simple … but there is a reason why Wolfram charges you to give you step-by-step directions.
– Hector
17 hours ago












Thanks Hector. :) I have accepted as well as upvoted the answer.
– iKnowNothing
17 hours ago




Thanks Hector. :) I have accepted as well as upvoted the answer.
– iKnowNothing
17 hours ago












 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f179535%2fconvert-trigonometric-expression-into-other-forms-using-just-a-specific-set-of-i%23new-answer', 'question_page');

);

Post as a guest













































































Comments

Popular posts from this blog

What is the equation of a 3D cone with generalised tilt?

Color the edges and diagonals of a regular polygon

Relationship between determinant of matrix and determinant of adjoint?