How do I solve for undetermined coefficients in equations like:-
>>> eq =a[0]*cos(x) + (a[1] - 1)*sin(x)
>>> solve(eq, a[0], a[1])
[{a₀: (-a₁ + 1)⋅tan(x)}]
I would like to get a[0] = 0 and a[1] = 1 as solutions.
Solve works well when terms in 'x' are algebraic expressions however not
for transce
There is a solve_undetermined_coefficients() function.
Aaron Meurer
On Sun, Jun 8, 2014 at 8:36 AM, Avichal Dayal wrote:
> How do I solve for undetermined coefficients in equations like:-
>
eq =a[0]*cos(x) + (a[1] - 1)*sin(x)
solve(eq, a[0], a[1])
> [{a₀: (-a₁ + 1)⋅tan(x)}]
>
> I would