Ask Your Question
1

.coefficients output

asked 6 years ago

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?

Preview: (hide)

Comments

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

tmonteil gravatar imagetmonteil ( 6 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 6 years ago

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.

Preview: (hide)
link

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 ( 6 years ago )

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: 6 years ago

Seen: 809 times

Last updated: Jan 04 '19