## Trying to evaluate a symbolic function using multiple subs / returned symbolic function with not all subs applied.

### Dan (view profile)

on 30 Nov 2012

Here is my code guys. Kind of stumped been at it for a while.

```syms Cb kT k x a v t;
```
```forcingFxn = (.5*k/kT*(v*t-x));
Uleft = (Cb/kT)*(2*x^2/a^2 -2/3)+ forcingFxn;
Uright  = (-Cb/kT)*(x/a-1)^2+forcingFxn;
```
```product = Uleft*Uright;
```
```dUl = diff(Uleft);
dUr = diff(Uright);
```
```%%Integral of this product
integral = int(product,t);
```
```finalExpressionForRt = exp(-integral);
substituted = subs(finalExpressionForRt,{t,x,Cb,k,kT,a,v},{1,0,40,2,4,1,1});
disp(substituted);
```

---------------------

Displays this when run...

```1/exp((8*Cb^2 - 5*Cb*k*v + k^2*v^2)/(12*kT^2))
```

Why are t,x,a being substituted while Cb,Kt,k and v are not???

Thanks for the help,

Dan

bym

### bym (view profile)

on 30 Nov 2012

what are you expecting to be the result for 'substituted' ?

```substituted =
```
`    8.7653e-029`

## Products

No products are associated with this question.