Ask Your Question
1

.coefficients output

asked 2019-01-03 16:56:06 +0100

gayyoda9 gravatar image

I am trying to solve a 2nd order differential eqn using power series. I used the .coeffients to get all the expressions with the constants a_0, a_1, a_2, a_3, .... The differential equation is homogenous so all of the expressions of coefficients = 0 and i want to work out how to get the expression and set it = 0 in a seperate list so i can put the list through solve() to find a_2, a_3, ... How can i do this?

edit retag flag offensive close merge delete

Comments

Could you please provide your current code (in particular the differential equation) ?

tmonteil gravatar imagetmonteil ( 2019-01-03 19:15:25 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-01-04 17:32:09 +0100

gayyoda9 gravatar image

I figured out how to do it. I added the solution_dict = True argument to the solve bit and then i created an empty list, used a for loop with .append(co[i][0] == 0) where co was the list of coefficients and it worked.

edit flag offensive delete link more

Comments

1

Congratulations on solving your problem. Would you share the complete code for a simple example for the benefit of other users?

slelievre gravatar imageslelievre ( 2019-01-04 19:51:01 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2019-01-03 16:56:06 +0100

Seen: 559 times

Last updated: Jan 04 '19