Here i am again. Can someone solve this equation. For which values of x the equation is correct. I solvd like a million of this, but this one is a small problem.
Code:sin2x = sinx + 1 - cosx
Printable View
Here i am again. Can someone solve this equation. For which values of x the equation is correct. I solvd like a million of this, but this one is a small problem.
Code:sin2x = sinx + 1 - cosx
For what range of values do you want solutions of x for? i.e. -180 < x < 180 etc? I'm assuming this is a trig-equation...?
Does sin 2x mean (sin (x))^2 (sin of x, squared) or sin(2x) (sin of 2*x)? Sorry for the confusion, i just want to get it straight.
Later
In the first case given by [Digital-X-Treme] I end up with:
cos(x) + tan(x) = 1
From here I'm stuck.
No, sin2x = sin(2x), if it was square i would have said it.
If I wasn't feeling quite so lazy, I'd (try to) solve this :rolleyes: Instead I'll suggest you try using one of the formulae that looks like:
Sin(A + B) = Sin(A)Cos(B) + Cos(A)Sin(B)
I've fogotten if that's correct, but there are 4 trig identities that are a bit like that, for Sin(A+B), Sin(A-B), Cos(A+B) and Cos(A-B). I think you might find your answer there.
You can substitute something like Sin(0) or Cos(90) (that's in degrees not radians obviously) for zero.
So far I have got x >= 90º
Not much but...
There might be some analytical way to solve this, but brute force Newton-Raphson will find roots if there are any. Do successive approximations on the Lastx formula until the result does not change much.
Function(x) = sin(2x) - sin(x) + cos(x) - 1
Derivative(x) = 2cos(2x) - cos(x) -sin(x)
Nextx = Lastx - Function(Lastx) / Derivative(Lastx)
I used MathCad7 to work on the above, getting, 45 & 225 degrees as solutions.
It seems as though adding multiples of 360 to the above solutions would give other trivial solutions.
Knowing the roots suggests that a little manipulation might have yielded those roots without using Newton-Raphson.
Whenever I can find the derivative and have my MathCad7 software available, I go for this method. Even writing a VB program is not tuff for something like the above.
Even if you do not know anything about derivatives (calculus is the name of the general subject), you can use a table from a handbook and work it out for a lot of functions.
ive never had trigo... but is that possible?:
1. sin2A = 2*sinA*cosA
2. 1 = sinA*sinA + cosA*cosA
wich means:
sin2A = sinA + 1 - cosA is the same like
2*sinA*cosA = sinA + (sinA*sinA + cosA*cosA) - cosA
then
cosA-sinA = (sinA*sinA + cosA*cosA) - 2*sinA*cosA
or
cosA-sinA = (sinA - cosA)^2 or
cosA-sinA = (cosA - sinA)^2 .. so
either
cosA - sinA = 1 or
cosA - sinA = 0
reply :)
-1<sinA,cosA<1, so the first cannot be
so: sinA = cosA -> A = 45° ?
180 + 45 = 225, that would be the 2nd solution..
*feelgood*
laterz
romanize, there are an infinite number of solutions for trigonometric equations like these. That is why you specify a range, such as -360º < x < 360º.
e.g. Solve
f(x) = sin(2x) - sin(x) + cos(x) - 1 for 0º < x < 720º
Laterz
yeah, if that's what i think, that's clear .. i just wanted to link to Guv's reply&MathCad7..
bye
Romanize: A job well done! Your manipulation of the equation led to correct solutions.
Contrary to other posts, (cosA - sinA) can be equal to one.
cosA - sinA = 1 when A = -90 degrees. (cos-90 = 0 & sin-90 = -1)
Hence there are three basic solutions: 45, 225, & -90 (or +270). A myriad more can be found by adding 360 to one of the basic solutions.
I did not find the one at -90 degrees. Newton-Raphson would have founds it if I had made a guess closer to -90(or +270), but the initial guesses I used were closer to the other soultions.
u r right there..
i'm going 2 install w95 now on my old machine for assembly programming only *s*,
laterz
Thanks for the fast (and correct) replies, guys. ;)
u have the vb7 installed, he (not qb7, i think)? how is it ?