COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### Trapezium Rule with Varying Strip Widths

• Follow

```I'm really stuck trying to work out this problem.

I have an integral  &#8747;1/x dx (between 1 and 101), and I want to use the trapezium rule to estimate the area but with strips that increase geometrically in width.
such that,

&#916;xn = r^(n-1).&#916;x1  (where &#916;xn is the width of the nth strip and r is a constant) ( to calculate &#916;x1 you apparently need to use the formula for the sum of a geometric progression, to give a total of 100 strips for any value of r)

Any ideas on how to go about producing a function to solve this? Any suggestions/help would be very much appreciated
```
 0

```"Jake Chihuahua" wrote in message <if7q03\$8b0\$1@fred.mathworks.com>...
> I'm really stuck trying to work out this problem.
>
> I have an integral  &#8747;1/x dx (between 1 and 101), and I want to use the trapezium rule to estimate the area but with strips that increase geometrically in width.
> such that,
>
> &#916;xn = r^(n-1).&#916;x1  (where &#916;xn is the width of the nth strip and r is a constant) ( to calculate &#916;x1 you apparently need to use the formula for the sum of a geometric progression, to give a total of 100 strips for any value of r)
>
> Any ideas on how to go about producing a function to solve this? Any suggestions/help would be very much appreciated

So why would your function not just call trapz, with
points at a varying distance?

Ok, I assume that as part of the homework assignment
you are disallowed from calling trapz. If so, then why
should we do your homework for you? What have YOU
tried to solve your problem, and how/why did it fail?

John
```
 0

1 Replies
505 Views

Similiar Articles:

7/26/2012 11:41:02 AM