Group Abstract Group Abstract

Message Boards Message Boards

0
|
1.9K Views
|
4 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Calculation of an integral with a variable lower limit using the trapezoidal method

Posted 1 year ago
POSTED BY: Yaroslav B
4 Replies
POSTED BY: Michael Rogers
Posted 1 year ago

I'm sorry, but I've been poking through this for like an hour and I have no idea what your code is doing. Can you minimize this example? Or can you at least pinpoint where you're actually applying the "trapezoidal method" for an integral and what variable is your "lower limit"?

Are the other plots correct? If not, is it the same problem?

Your final plot is based on spisoksigmaPSKRR[[1]][[iendRR]] and spisoksigmaPSKRP[[1]][[iendRP]] where iendRR and iendRR are both 41. I'd recommend you pull out that slice of data, figure out by what factor it deviates from the expected, and then see where in your code that factor might have been changed/misapplied/whatever.

Alternatively, maybe just explain what these functions are and let us help you start from the beginning. That's probably easier than reverse-engineering this wall of code.

FWIW, this site isn't intended as a place for free debugging services. I probably won't spend any more time on this if you can't isolate the problem to a specific programming question. Maybe someone else has the time to spend on this.

POSTED BY: Eric Rimbey
Posted 1 year ago

Question:

At the top you define

b[t_] := t
SigmaRhoBegin[rho_, phi_] = 0
SigmaRhoPhiBegin[rho_, phi_] = 0

None of these definitions for these symbols is ever updated. Elsewhere in your code you have expressions like

D[b[t], t]
D[SigmaRhoBegin[rho, phi], rho]
D[SigmaRhoPhiBegin[rho, phi], rho]

So, D[b[t], t] will always be 1, D[SigmaRhoBegin[rho, phi], rho] will always be 0, and D[SigmaRhoPhiBegin[rho, phi], rho] will always be 0. Can you explain what your intention is behind this?

POSTED BY: Eric Rimbey
Posted 1 year ago

Those two graphs look basically the same to me. Can you point out where the problem is?

Oh, the heights are different.

POSTED BY: Eric Rimbey
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard