1 | initial version |

You can define your function first, and then plot it:

```
sage: f(x) = ((1+x*I)^(1+5*I)).real()
sage: plot(f,x,0,5)
```

2 | No.2 Revision |

You can define your function first, and then plot it:

```
sage: f(x) = ((1+x*I)^(1+5*I)).real()
sage: plot(f,x,0,5)
```

Then,

```
sage: integral_numerical(f,0,1)
```

leads to an error. A workaround is to define your function `f`

not as a symbolic expression, but as a lambda function:

```
sage: f = lambda x: ((1+x*I)^(1+5*I)).real()
sage: plot(f,x,0,5)
sage: integral_numerical(f,0,1)
(0.1786803251930374, 2.0932402003702034e-15)
```

3 | No.3 Revision |

You can define your function first, and then plot it:

```
sage: f(x) = ((1+x*I)^(1+5*I)).real()
sage: plot(f,x,0,5)
```

~~Then,~~But concerning your second question,

```
sage: integral_numerical(f,0,1)
```

leads to an error. A workaround is to define your function `f`

not as a symbolic expression, but as a lambda function:

```
sage: f = lambda x: ((1+x*I)^(1+5*I)).real()
sage: plot(f,x,0,5)
sage: integral_numerical(f,0,1)
(0.1786803251930374, 2.0932402003702034e-15)
```

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.