opinions for an integral method

edited March 2009 in Science & Tech
Hi everyone,someone told me that with this method i can find the integral of final1 with respect to E.

A=12.56e-4;
L=0.44;
G=2;
T=300.0;
q=1.6e-19;
k=8.62e-5;
d=0.01;
de1=0.1;
ndot1=5e9;
Edot1=0.3;
static1=(G*ndot1)/(sqrt((pi*de1)/2));
%integral
E=(0:0.01:1000);
paronomastis1=1./(1+exp(q*(E-q*(v1/L))/(k*T)));
ek8eths1=((E+Edot1+(v1/L))/de1).^2;
function2=exp(-2*ek8eths1);
final1=paronomastis1.*function2*static1;
subtotal1=sum(final1)*d;

Do you think that this method is correct?Could you please explain how this method calculate the integral?
Thank you..

Comments

  • MyrmidonMyrmidon Baron von Puttenham California Icrontian
    edited March 2009
    ...Fermi-Dirac statistics? Is that you?

    It looks like this MIGHT work in matlab, although I think there are some syntax errors (places where your informant used * instead of .*)

    The overall idea seems sound. I'm not entirely sure, because you haven't given us the form you want for final1. I'm going to trust you and assume that final1 (before integration) = paronomastis1 * function2 * static1.

    So I'll trust you that the math part of his/her idea is right.

    The programming idea behind what this person has given you is essentially a Riemann sum. S/he's using a matrix of E values to compute a matrix of final1 values (although I'm not sure of the syntax), which corresponds to your curve. S/he's then finding the area beneath the final1 values by summation of the function and subsequent multiplication of a scalar dE, in this case used by d. Note that the multiplication of d is outside of the sum of final1, which in THIS case is kosher due to the distributive property.

    It is only moderately important to note that a Riemann sum is only an approximation of the integral.

    It is very important to note that in order to do a Riemann sum properly, the step size of his E matrix must be equal to his dE - s/he should really have done E=(0:d:1000);

    It is extremely important to note that I have NOT attempted to run this problem and look for syntax errors - in fact, I've never used the 'sum' function, but I assume it sums all quantities in a matrix. You're on your own for that stuff! Just make sure you're not doing a cross product when you mean to do a dot product! :)
Sign In or Register to comment.