Desperado 170 Report post Posted December 2, 2010 Hello folks,I'm supposed to solve the equationk * (cos(x)^2 - sin(x)^2) = sin(x)^(2-e)for x. k and e are symbolic constants.Can you tell me if this is possible?Thanks a lot! 0 Share this post Link to post Share on other sites
alvaro 21247 Report post Posted December 2, 2010 Quote:Original post by DesperadoHello folks,I'm supposed to solve the equationk * (cos(x)^2 - sin(x)^2) = sin(x)^(2-e)for x. k and e are symbolic constants.What is the variable you are solving for? 0 Share this post Link to post Share on other sites
ibebrett 205 Report post Posted December 2, 2010 sorry made a mistake, but use the idenititycos^2 + sin^2 = 1to make your life easier. 0 Share this post Link to post Share on other sites
sooner123 269 Report post Posted December 2, 2010 Unfortunately for a case like this (mainly because of the constant in the exponent of the sine function), you will need to use an approximating method like Newton's.This method zeroes in on an approximate answer to f(x) = 0. So in this case in order to find an x that satisfies a(x) = b(x), we find an x that satisfies f(x) = 0 = a(x) - b(x)f(x) = sin(x)^(2-e) - k * (cos(x)^2 - sin(x)^2)f'(x) = (2-e)cos(x)sin(x)^(1-e) + 4ksin(x)cos(x))Make an initial guess. Best to use a graphing calculator or software of some kind to get an idea of where f(x) = 0, make your initial guess x_0, then continue improving your guess using this formula:x_(n+1) = x_n - f(x_n) / f'(x_n) 0 Share this post Link to post Share on other sites
Emergent 982 Report post Posted December 2, 2010 @alvaro: He's solving for x.@Desperado:You can transform the problem into two easier-looking problems. First you'd solves^(2-e) + 2 k s^2 - k = 0for s, and thensin(x) = sfor x.The second of these is easy, so we just need to worry about the first.How easy or hard it is to solve depends entirely on what 'e' is. If 2-e is a positive integer less than five, closed-form solutions are possible (0 <= e <= 2 are the easiest cases of course; then it's quadratic). If e is noninteger (or worse, irrational), I doubt there's a closed-form solution.That said, closed-form solutions are overrated IMO. One nice thing about the polynomial you've got there is that there are nice root-finders that are guaranteed to return all the roots of polynomials.Newton's method is also a (fast, easy) option, though you don't generally have global convergence guarantees.Personally, if using Newton's method, I'd actually solve the related system of equations,k * (c^2 - s^2) - s^(2-e) = 0s^2 + c^2 - 1 = 0for s and c. Then you can recover 'x' with a two-argument arctangent. The Jacobian of this system, by the way, is,[ 2 k c (-2 k - 2 + e) s ][ 2 c 2 s ](which you'll need for Newton's method). 0 Share this post Link to post Share on other sites
alvaro 21247 Report post Posted December 2, 2010 Quote:Original post by Emergent@alvaro: He's solving for x.Oh, I think I misread the OP. 0 Share this post Link to post Share on other sites
grhodes_at_work 1385 Report post Posted December 5, 2010 Folks,Please review the Forum FAQ discussion of homework policy for this forum. I know that the way people learn has evolved thanks to the Internet, and lately I have been more tolerant of people asking this sort of question as a result. That said, please do be careful in your replies. I really don't want to see detailed answers that someone could copy/plagiarize and turn in as their own work. Offer advice and hints/suggestions, that's fine.Thank you. 0 Share this post Link to post Share on other sites
Desperado 170 Report post Posted December 9, 2010 Thanks for all of your answers.And no, this was not a homework assignment. 0 Share this post Link to post Share on other sites
Maze Master 510 Report post Posted December 9, 2010 Is e small? If so, you might want to solve it for e=0, then use that as your initial guess for the iterative method you use (like Newtons method mentioned above).Wolfram Alpha provided closed form formulas for the solutions when e=0, but I can't seem to get the links to work right. You can just go there:http://www.wolframalpha.com/and type in:k * (cos(x)^2 - sin(x)^2) = sin(x)^2and it will give you the solutions. 0 Share this post Link to post Share on other sites
alvaro 21247 Report post Posted December 9, 2010 Quote:Original post by Maze Master[...]Wolfram Alpha provided closed form formulas for the solutions when e=0, but I can't seem to get the links to work right. You can just go there:http://www.wolframalpha.com/and type in:k * (cos(x)^2 - sin(x)^2) = sin(x)^2and it will give you the solutions.That one you can solve by hand: Substitute cos(x)^2 = 1 - sin(x)^2, solve the equation treating sin(x) as the variable, and then take arcsin at the end. 0 Share this post Link to post Share on other sites
Maze Master 510 Report post Posted December 9, 2010 Quote:Original post by alvaroThat one you can solve by hand: Substitute cos(x)^2 = 1 - sin(x)^2, solve the equation treating sin(x) as the variable, and then take arcsin at the end.Ahh nice one! I should have read your original post more carefully. 0 Share this post Link to post Share on other sites