# Homework 17
## Symbolic math

### Problem 1
#### Part a

Import the library needed for using symbolic math in python. Also setup the notebook for printing.


```python

```

#### Part b
Set variables x, y, z, and function f, and g.


```python

```

#### Part c

Set an expression for the following: $$x^2+2x-5.$$



```python

```

 #### Part d
 
Evaluate the expression for $x=1.5$. Also, make a variable substitution: $z$ for $x$. Do a variable substitution $y^2$ for x. 


```python

```

### Problem 2
#### Part a

Simplify the following expression:
$$\frac{x^2 - x - 6}{x^2-3x}.$$


```python

```

#### Part b

Expand the following expression symbolically: $$(x+1)^3(x-2)^2.$$


```python

```

#### Part c
Factor the following expression: $$3x^4 - 36x^3+99x^2-6x-144.$$


```python

```

### Problem 3
#### Part a
Compute the symbolic derivative: $$\frac{d}{dx}\sin^2(x)e^{2x}.$$
Then evaluate the resulting expression for $x=3.3.$


```python

```

#### Part b
Create a sympy expression representing the following integral:
$$\int_0^5x^2\sin(x^2)dx.$$

Then evaluate the integral symbolically.


```python

```

### Problem 4
#### Part a
Solve for the roots of the following equation: $$x^3+15x^2=3x-10.$$
Use the ```Eq``` and ```solve``` functions and save as an expression. Show the expression (it will be a list). Then find the numerical value of each root using the evalf function. You can use evalf on some expression using ```my_expression.evalf()```.


```python

```

#### Part b
Solve the system of three equations in three unknowns symbolically:
\begin{align}
x+y+z&=0 \\
2x-y-z&=10 \\
y+2z&=5
\end{align}
Compare the result to the answer computed with fsolve from scipy.optimize.


```python

```

#### Part c
Solve the following differential equation symbolically using the ```dsolve``` function:
$$\frac{df(x)}{dx} = x\cos(x).$$


```python

```

### Problem 5
#### Part a
For the system $Ax=b$ with
$$ A = \left[\begin{matrix}
1 & 2 & 5 \\
3 & 4 & 6 \\
-1 & 0 & 3
\end{matrix}\right],$$
$$b = \left[\begin{matrix}
1 \\
0 \\
-2
\end{matrix}\right].$$
Setup the matrices $A$ and $b$



```python

```

#### Part b
For the system in Part a, solve for matrix $x$ by matrix algebra.


```python

```

#### Part c

For matrix A above, return the middle row, and the middle column.


```python

```

#### Part d
Create a matrix $M$ using the ```zeros``` function that has 2 rows and 2 columns. Fill in some values using array notation (like M[i,j]=value).


```python

```

9c185111b730eddd655eab478908aa9914b093d6
ipynb
Jupyter Notebook
python/HW17.ipynb
uw-cheme375/uw-cheme375.github.io
5b20393705c4640a9e6af89708730eb08cb15ded
BSD-3-Clause
python/HW17.ipynb
uw-cheme375/uw-cheme375.github.io
5b20393705c4640a9e6af89708730eb08cb15ded
BSD-3-Clause
python/HW17.ipynb
uw-cheme375/uw-cheme375.github.io
5b20393705c4640a9e6af89708730eb08cb15ded
BSD-3-Clause
Qwen/Qwen-72B
1. YES
2. YES

