Group Abstract Group Abstract

Message Boards Message Boards

0
|
6.2K Views
|
3 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Expand respect to some variable

Posted 10 years ago

How can I Expand equation of

(4 + 2 s + s^2) (10 + 9 s + s^4)

recpect to variable 's'?

Thank you.

POSTED BY: Mara Matinpoika
3 Replies

As Nasser mentioned, you can use Expand to fully expand your algebraic expression. If you want to know specifically the coefficients of powers of s then you can use CoefficientList as in the following:

In[1]:= CoefficientList[(4 + 2 s + s^2) (10 + 9 s + s^4), s]

Out[1]= {40, 56, 28, 9, 4, 2, 1}

If you just want the coefficient of a particular power of s then use Coefficient as in this:

In[2]:= Coefficient[(4 + 2 s + s^2) (10 + 9 s + s^4), s, 3]

Out[2]= 9

All of this assumes that you are working with polynomials rather than more complicated expressions...

POSTED BY: David Reiss

What equation? That's an algebraic expression, not an equation.

POSTED BY: Daniel Lichtblau

What do you mean by expand with respect to s ? What is the output you are looking for and why Expand do not work for you?

Clear[s]
f = (4 + 2 s + s^2) (10 + 9 s + s^4);
Expand[f]
(*40 + 56 s + 28 s^2 + 9 s^3 + 4 s^4 + 2 s^5 + s^6*)
POSTED BY: Nasser M. Abbasi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard