Hi Mike,
For this particular case, you can get some insight
into the nature of the solution(s) by graphing
the both sides on the same set of axes. Try it
using different values for the constants. (i.e.
changing the slope and y-intercept of the line)
In general, for things like this you can expand the
function in a Taylor series, truncate the series
somewhere and solve the resulting algebraic equation.
sin(x) = x - x^3/3! + x^5/5! - x^7/7! + x^9/9! - ......
so
x - x^3/3! + x^5/5! - x^7/7! + x^9/9! - ...... = ax +b
or let c = -b and d = 1-a and write
c + dx - x^3/3! + x^5/5! - x^7/7! + x^9/9! - ...... = 0
then decide how many terms you want to keep in the series.
Let's say, just for this example, that you want to keep
them up to the 5th power. Then your equation would be :
c + dx - x^3/3! + x^5/5! = 0
Now solve that for x. You'll get 5 roots.
Some of them may be duplicates and some of them may
end up being complex (in the general case).
Hope that helps.
John
Mike Massen wrote:
{Quote hidden}>
> Hi all,
>
> Am doing some processor PWM filtering work and preparing the background
> for encoding some maths calcs and am faced with trying to solve the general
> equation sin(x)=ax+b, Where a and b are constants.
>
> Oh by the way I don't seem to get all list responses so if someone has an
> idea of a solution can they cc me at <
.....erazmusKILLspam@spam@wantree.com.au>
>
> Actually, I'd be interested in a web site which has general function
> solutions - I suppose a web site version of Mathcad or something like that...
>
> Rgds ~`:o)
>
> Mike Massen
> Trading as "Network Power Systems"
> Perth, Western Australia
> Ph/Fx +61 8 9444 8961
> Products/Personal/Client web area at
http://www.wantree.com.au/~erazmus
> (Current feature - trip to Malaysia to install equipment in jungle power
> site)
>
> Some say there is no magic but, all things begin with thought then it becomes
> academic, then some poor slob works out a practical way to implement all that
> theory, this is called Engineering - for most people another form of magic.