6672 Reputation

17 Badges

10 years, 174 days

MaplePrimes Activity

These are answers submitted by tomleslie

  1. Define a function which returns a floating point value corresponding to the Bessel function of the first kind and zeroth order, for the supplied argument
  2. Define a function which does not evaluate to a float, but which Maple 'recognises' as a Bessel function of the first kind and zeroth order. The return value of this function can subsequently be evaluated to a float

Both approaches are shown in the attached

As the error message suggests, changing the solution command to

sol := TWSolutions(Sys, [f(xi), g(xi), h(xi)])

will generate three "solutions" - none of which are actually functions of xi, and all of whihc are confirmed as' solutions' using pdetest()

Reason for this probably that (according to the TWSolutions help page)

The TWSolutions command computes Traveling Wave Solutions (TWS) for autonomous partial differential equations (PDE) that are rational and nonlinear in the unknowns and their derivatives. An autonomous system is one where the independent variables do not appear explicitly, only through the unknown functions and their derivatives.

Your system is not autonomous since the variable 'xi' explicily appears in all three equations in sys


Since you do not post any code specifying f(x,a) or g(x,a), then I cannot explicitly solve solve your problem. However the attached 'toy' example shows the basic process whihc I think(???) yu are trying to achieve. It

  1. defines two function f(x,y) and g(x,y), where 'x' is  assumed to be a variable and 'y' a 'parameter'
  2. specifies a specifc value for the parameter 'y'
  3. computes the roots of the function (f(x,y) for the given value of the parameter 'y'
  4. evaluates g(x,y) for the same value of the parameter 'y', with x-values being the roots computed in step (3) above.
  5. returns the maximum value of g(x,y), where 'x' is one of the roots of f() as computed in step (3)  above, and y is the parameter value defined at step (2) above

The attached work sheet takes an example from the NLPsolve help page, and solves it using 'algebraic' expressions for the objective function and constraints.

The same problem is then solved using 'procedure' inputs for the objective function and constraints.

The same problem is then solved using 'operator' inputs for the objective function and constraints.

One of these must cover the situation you want - otherwise you will have to post the code for your problem

The Maclaurin series of a an expression is simply the Taylor series, expanded about zero, which can be achived with the taylor() command. So just check out the help page for taylor

Well I had some problems when the new MaplePrimes interface arrived but everything seems to be working (for me) now. Basic process I use

  1. Click the big green up-arrow in the MaplePrimes editor toolbar. This will produce a popup window
  2. Click the 'Browse' button, which shoud allow you to select a file
  3. Click the 'Upload' button in the popup
  4. The popup then provides a choice between 'Insert Link' and 'Insert Contents'. I only ever use 'Insert Link'. If you click the 'Insert Link' button, then a link to your file should appear in your post
  5. Then click 'OK' in the popup
  6. If tis process doesn't work then I recommend you clear the cache in your browser, restart it, and try again

The following is somewhat lengthier than VV's solution, but is considerably quicker, mainly because it reduces the number of sin(x)/x evalutions

Standard way to solve this problem is with fsolve(). Most of the commands in the Student[NumericalAnalysis] package (including Newton), only handle single expressions, not systems of equations.

The attached shows one solution

The attached worksheet has three execution groups, one of which may address your problem

  1. The first execution group just plots the solution of  the differential equation deL, for a range of values of D(theta)(0) - just so that one can see when the solution 'overshoots' the value theta=0. It si pretty office that this overshoot only occurs for D(theta)(0) < -9 (approximately
  2. The second execution group determine the maximum value of D(theta)(0) for which the solutioon of the ODE reaches the value theta=-0.1.
  3. The third execution group uses the output of (2) above to plot the complete solution for this value of initial velocity. The output plot is "zoomed" to the area around theta=-01, so that one can visually check that this value is attained

I could probably tidy up this worksheet quite a lot, but since I don't know whether or not I am actually doing anything useful, I'll skip such niceties

Using Christopher's diagram, it is trivial to see that

sin( theta/2 )=(a/2)/R # that't just 'opposite/hypotenuse'

so theta=2*arcsin(a/(2*R))

so the arc length is R*2*arcsin(a/(2*R))

so the projected area is 2*R*h*arcsin( a/(2*R) ), where 'h' is the other dimension of the rectangle

The 'shoot' package is not a part of standard Maple.

If the standard Maple command dsolve(ODEsys, numeric) provdes solutions, why would I want to use a shoot() method. I haven't got anything against shooting methods, just curious as to why I would bother with an add-on package when the Maple's in-built dsolve() command provides the required solution. I guess I could see it from a pedagogic standpoint, but I can't really believe that one i goingto learn much from issuing the command

shoot( odeSYS, numeric)

rather than

dsolve(odeSYS, numeric).

The attached shows the solution to your problem, with a graph of all the functions in your ODE system, obtained using dsolve(ODEsys, numeric). What else do you want/need

You don't say how you are running this test (no code!), but Matalb will use hardawre floating point arithmetic by default ..... and Maple won't.

Try defining the matrices using

Matrix(100,100,(i,j)->rand(), datatype=float[8])

and run the test again

You don't really have three equations in three unknowns - you have three equations in one unknown. Consider your equations with a simple substitution, as in

# The equations OP wishes to solve are
  eqs:={ 53.50000000+26.50000000*exp(-34.55372656*k*h__1*h__2/(8658.242188*k*(h__1+h__2)+8.658242188*h__1*h__2)) = 56.15,
         53.50000000+26.50000000*exp(-17.01469059*k*h__1*h__2/(8658.242188*k*(h__1+h__2)+8.658242188*h__1*h__2)) = 64.1,
         53.50000000+26.50000000*exp(-8.094482719*k*h__1*h__2/(8658.242188*k*(h__1+h__2)+8.658242188*h__1*h__2)) = 72.05
# Now with a simple substitution, one can write these
# equations as
  eqs2:=subs( k*h__1*h__2/(8658.242188*k*(h__1+h__2)+8.658242188*h__1*h__2)=z, eqs);

This generates three equations in one unknown - and these cannot be simultaneously solved

I don't reallly understand your problem - see the attached

First of all I agree with vv - your model can only generate values in the range [-infinity..1], and the values of yor dependent variable are in the range [0..~100]. Axel's suggestion that y-values should be interpreted as percentages, bringing there range to [0..1] seems the most plausible explanation. However it doe not explain the parameter values yu claim to have recieved from Excel

The attached file generates plots from Statistics/Fit, DirectSearch/DataFit, and using the values yu claim to have obtained from Excel.

Assuming all y-values should be divided by 100, then Fit and DataFit agree, and I suppose the quality of the fit is not too bad.

No combination of the the data and the parameters which you claim to have obtained from Excel produces fits which are anything other than appalling


First 109 110 111 112 113 114 115 Last Page 111 of 138