acer

32510 Reputation

29 Badges

20 years, 14 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@shkarah I watched the video, as well as another by the same author, on plotting.

I would not recommend following that author's techniques for handling expressions with procedure calls which, to me, do not seem sensible and robust.

@Zeineb And why didn't you mark your Question as related to Maple 18, in the first place?

@shkarah Your definition of procedure f is not set up to handle the indexed, recursive call. And so your code has a nonsensical syntax, in my opinion.

You are using the name f for function calls in two different ways, and not set up by you to resolve the discrepancy.

Why don't you state in words precisely what you're trying to accomplish?

Upload and attach your actual document.

Where is x, in your definition of f?

@permanoon123 

In general you should not be trying to use ApproximateInt from the Student:-Calculus1 package to do general numeric integration. That command provides simple and basic approaches, provided mostly as a means of introductory instruction in the topic for undergraduate students.

Much more sophisticated and powerful techniques are available using the syntax evalf(Int(....)). See this comment for some description of the basic syntax. Or see the Help system.

Of course that's not going to help get you a finite result if your integral is divergent.

@permanoon123 So, why can't you be bothered to type in the integral in Maple yourself?

@permanoon123 Why do you want to work with the trapezoid rule?

What do you mean by stating that y=2, when y is used as a variable of integration?

What is f(y)?

@Carl Love I believe that the Equation Label needs to be shown to be used, and they are only shown alongside output.

I inserted a Label reference, and then went back and supressed output of the line that had that Label, by terminating the statement with a full colon. Upon re-execution of the whole sheet that inserted reference became "??" and the error "Invalid label reference" was emitted. This was in a Worksheet, in 1D input mode.

Moreover, only one Label gets shown if I have several statements in an Execution Group, each terminated with a semicolon. An inserted reference seems to get the last output.

Please provide a complete example.

Did you perhaps intend this as an optimization problem, to find values which made the equations close to zero?

Why set the data up in floating-point, and incur loss of precision up front?

Did you forget to attach something?

Which Maple version are you using?

@Carl Love There is some problematic aspect to that use of thisproc (but I'm not sure just what...), and style=pointline (Maple 2015?).

LogisticMapM1802.mw

@weidade37211 

You can also see Wikipedia for more thorough descriptions of symbolic and numeric integration.

Here are some basic notes on Maple syntax for doing both such computations.

restart

The following are calls to the active command int  (lowercase), or its 2D Input analogue.

I entered the second one of these using the Expression palette . Notice that the 2D Input integral symbol is in black.

int(sin(x), x = 0 .. Pi)

2

int(sin(x), x = 0 .. Pi)

2

 

The following are calls to the inert command Int  (capitalized). Notice that the 2D Input integral symbol is in gray.

 

H := Int(sin(x), x = 0 .. Pi)

Int(sin(x), x = 0 .. Pi)

That can also be entered in 2D Input using command-completion :

R := Int(sin(x), x = 0 .. Pi)

Int(sin(x), x = 0 .. Pi)

Those can be turned into active calls using the value  command:

value(H), value(R)

2, 2

They can also be computed using numeric integration . (See also here.)

evalf(H), evalf(R)

2.000000000, 2.000000000

Numeric integration can also be done by supplying a floating-point value in the integration range, or by supplying the option numeric in a call to active int. (For this to succeed and produce a floating-point result the integrand must evaluate to numeric values for each numeric substitution of the variable of integration, naturally). I do not recommend this syntax, as it blurs the more clear distinctions above.

int(sin(x), x = 0. .. 3.1415)

1.999999996

int(sin(x), x = 0 .. Pi, numeric)

2.000000000

The syntax evalf(Int(....)) allows for various additional options, which specify the numerical method, working precision, tolerance, etc.

evalf(Int(sin(x), x = 0 .. Pi, method = _Dexp, epsilon = 0.1e-13, digits = 15))

2.00000000000000

See also Section 4.2  of the User Manual, and Section 7.4  of the Programming Guide.

Download integration_notes.mw

First 202 203 204 205 206 207 208 Last Page 204 of 595