Problem with numerical integration

In summary, the problem is that the step size is too small, and therefore the integration tolerance is not being met.
  • #1
MJCfromCT
20
0
Hi all,

I am having trouble numerically integrating a function using Maple 10. Here is a bit of background on the problem:

This problem is asking for two plots, one of the velocity of a sounding rocket with respect to time, and the other being the height of the sounding rocket with respect to time. Gravity and drag act on this rocket.

I have the following equations:

density as a function of altitude
drag coefficient as a function of mach number
mach number as a function of velocity
drag as a function of drag coefficient
thrust as a function of mass flowrate and exhaust velocity
mass as a function of time

This problem asks to create these plots for various values of mass flowrate that I am supposed to set myself (2 kg/s, 2.1 kg/s, 2.2...etc).

The known constants that I have are the following:

specific impulse
exhaust velocity
initial mass
initial velocity
initial height
initial density

After inputting everything into maple, I come up with this differential equation:


sys1 := [diff(v(t),t) = (thrust-drag-mass*9.81)/mass, diff(y(t),t) = v(t)];


I am not great with maple, so I am not sure if this is even the correct syntax.

In my attempt to solve the differential equation, I tried this command:


sol1 := dsolve(sys1, numeric, v(0)=0, y(0)=0);


Unfortunately, this gives me the following error:


Error, (in dsolve/numeric/type_check) insufficient initial/boundary value information for procedure defined problem


Any suggestions as to what may be causing the problem here? If necessary, I can post my entire maple file if more detail is needed. Thanks in advance.
 
Physics news on Phys.org
  • #2
MJCfromCT said:
If necessary, I can post my entire maple file if more detail is needed. Thanks in advance.

That would be good. In fact, why don't you just attach the maple file. That way those of us who have Maple 10 can just download it and run it.
 
  • #3
Hi Tom,

Attached is my Maple 10 file. Thanks in advance.
 

Attachments

  • problem1.mw
    36.9 KB · Views: 430
  • #4
OK, I just tried to look at it but unfortunately I have Maple 9.5 at work, and it has a ton of typesetting error messages. I have Maple 10 at home and will look at it when I get there.
 
  • #5
Thanks for your reply, Tom.

I have made some progress with this, but I have switched from Maple to Matlab. Attached are my MATLAB files. When run, I get an error stating:

"Warning: Failure at t=4.258022e+001. Unable to meet integration tolerances without reducing the step size below the smallest value allowed (1.136868e-013) at time t."
 

Attachments

  • rocket.m
    382 bytes · Views: 515
  • problem1.m
    418 bytes · Views: 435

Related to Problem with numerical integration

1. What is numerical integration?

Numerical integration is a mathematical method used to approximate the value of a definite integral by dividing the interval into smaller intervals and summing up the areas under the curve of the function over those intervals.

2. What are the common problems with numerical integration?

Some common problems with numerical integration include round-off errors, integration errors due to the use of an insufficient number of intervals, and errors caused by using an inappropriate numerical integration method for a specific function.

3. How do round-off errors affect numerical integration?

Round-off errors occur when a computer program approximates a decimal number and introduces a slight error. In numerical integration, these errors can accumulate and affect the accuracy of the final result.

4. How can I improve the accuracy of numerical integration?

To improve the accuracy of numerical integration, you can use a more advanced numerical integration method, increase the number of intervals, or use a higher precision floating-point system to reduce round-off errors.

5. What are the advantages of numerical integration over analytical integration?

Numerical integration is often used when analytical integration is not possible or when the function is too complex. It also provides a more accurate solution for functions that cannot be integrated analytically. Additionally, numerical integration can be easily automated using computer programs.

Similar threads

Replies
5
Views
732
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
Replies
3
Views
610
  • Calculus and Beyond Homework Help
Replies
13
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
3K
  • Calculus and Beyond Homework Help
Replies
1
Views
948
  • Calculus and Beyond Homework Help
Replies
16
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
24
Views
2K
Replies
2
Views
512
Back
Top