Ask Your Question
1

.coefficients output

asked 2019-01-03 09:56:06 -0600

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 12:15:25 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2019-01-04 10:32:09 -0600

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 12:51:01 -0600 )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 09:56:06 -0600

Seen: 60 times

Last updated: Jan 04