266 Reputation

7 Badges

19 years, 132 days

Social Networks and Content at

MaplePrimes Activity

These are answers submitted by gulliet

Write your expression as a function of, say, t (for time). Then you can use the function Asymptotes in the package Student[Calculus1] to find the horizontal asymptote. Then you can use the function plot to produce a graph similar to the following. 97_plot_equation.jpeg Regards, -- Jean-Marc
More details might be needed to correctly answer your question. Below, I assumed a square matrix (45 rows by 45 columns) and got an error message (so nothing was populated). Then, I changed the upper limit to 44 and the code ran fine (columns one, six, eleven, ..., were populated), though the result might not be what you expected.
> with(LinearAlgebra);
> A := Matrix(45);

                           Matrix(%id = 151654440)

> for i to 45 do for j from 0 by 5 to 45 do A[i, j+1] :=
    evalf(EllipticF(sin(i*deg2rad), sin(j))) end do end do;

Error, Matrix index out of range

> for i to 45 do for j from 0 by 5 to 44 do A[i, j+1] :=
    evalf(EllipticF(sin(i*deg2rad), sin(j))) end do end do;
> A;
                           Matrix(%id = 151654440)
97_matrix_population.jpg Regards, -- Jean-Marc
In addition to Acer's reply, you might be interrested by the interactive tutors, such as Defferential Methods. Here are some screenshots to help you to find your way. 97_menu_tutor_differential.jpeg 97_tutor_differentiation_methods.jpeg Regards, -- Jean-Marc
I believe that the following does what you are looking for.
> with(Statistics);
> X := [380, 4000, 4067, 5789]; Y := [10, 35, 56, 82];
> ScatterPlot(X, Y, title = "My Demo Data");
97_scatterplot.jpeg Regards, -- Jean-Marc
Without more information, I guess that you have tried an implicit plot with the default options. Try to set the option gridrefine to a higher value (it is set to two in the example below).
> with(plots, implicitplot);
> implicitplot(abs(x)+abs(y) = 5, x = -10 .. 10, y = -10 .. 10);
> implicitplot(abs(x)+abs(y) = 5, x = -10 .. 10, y = -10 .. 10, gridrefine = 2)
Regards, -- Jean-Marc
For your first procedure, I would suggest to use the above-mentioned function. For instance,
> a := 12343; b := 12353;
> StringTools:-CommonPrefix(convert(a, string), convert(b, string));
As you can see above, the last line is functionally equivalent to procedure one and thus without the need to convert strings into list of strings, to use temporary variables, to write a procedural looping construct to name a few. Moreover, I believe that this function is faster than the for-loop construct (though this claim might be erroneous: I am not expert enough in Maple programming to be hundred percent sure). Hope this helps, -- Jean-Marc
You could ask your question the other way around: "Why does Mathematica takes (much) more time on calculating than Maple?" For instance, on my system (Windows XP SP2, Pentium 4HT, x86-32, Mathematica 6.0.1, Maple 11.01), it takes about 12 seconds to Mathematica to compute the following integral 97_slow_integral_Mathematica.jpg whereas Maple needs less than a fifth of a second! restart; st := time(); `assuming`([int((a+c-sdfd+34*e)*exp((a+4*c-d+34*e)*x^2+(b-54*c+4*h)*x+c), x = -infinity .. infinity)], [a+4*c-d+34*e < 0]); time()-st;
Most of the time, you will not notice any significant differences in the speed of computation between both systems. Still, it might occur that a specific expression is (much) slower to evaluate in one system than the other. Most of the time, this is due to the way that each systems are going to analyze, simplify, transform, look for patterns, etc., for a given expression, and consequently this is going to influence the choice and order of algorithms that may be applied before finding the solution. Finally, do not expect that both systems use the same algorithms in the same order, nor that they use what is taught to human beings in a calculus course. Regards, -- Jean-Marc
To answer your first question, you could use assume to tell Maple that x is positive and a is a real, then simplify to get rid of the twos, and finally combine both logarithms into one, as in
> expr := ln(2*x-2*a)/a-ln(2*x)/a;
                           ln(2 x - 2 a)   ln(2 x)
                           ------------- - -------
                                 a            a   
> assume(x > 0);
> assume(a, real);  
> combine(simplify(expr));
                                    /x - a\
                                    \  x  /
Note that there exists no systematic rules to apply to get any desired result: only by experience and by experimenting one may find the correct way for a specific expression. Regards, -- Jean-Marc
From the online help for the MmaTranslator package, "Note: The MmaTranslator package does not convert Mathematica programs." In Mathematica parlance, using the SetDelayed assignment (shortcut :=, colon equal) is deemed as defining a user function or program. So remove the set delayed and the list of assignment will be correctly translated.
FromMma(`( T={1,2,3}; v[{}]=0; v[{1}]=1; v[{2}]=2;v[{3}]=3;v[{1,2}]=4;v[{1,3}]=5; v[{2,3}]=6; v[T]=19;)`);

 MmaTranslator/Assign(T, [1, 2, 3]), MmaTranslator/Assign(v([]), 0), 

   MmaTranslator/Assign(v([1]), 1), MmaTranslator/Assign(v([2]), 2), 

   MmaTranslator/Assign(v([3]), 3), MmaTranslator/Assign(v([1, 2]), 4), 

   MmaTranslator/Assign(v([1, 3]), 5), MmaTranslator/Assign(v([2, 3]), 6), 

   MmaTranslator/Assign(v(T), 19)

To answer your second question, it would be great if you could explain in plain English what Test1 is supposed to achieve. No offense here, but from Mathematica point of view, this "function" creates a bunch of unrelated global symbols (and not an array called v) and the SetDelayed assignment is totally useless. For instance, what do you expect from the Mathematica expression v[{}] = 0? I f v is supposed to be an array (a list in Mathematica jargon), this expression if meaningless. On the other hand, if v is supposed to be a function, then the above expression can be interpreted as the definition of the special case where the function v is provided with an empty list as argument and in this case is instructed to return zero. Regards, -- Jean-Marc
Not sure what the question is, but if you want an exact result just enter the fractions and hit the 'enter' key. You can also get numerical approximation to an arbitrary number of digits. > 1/19-5/18; -77 --- 342 > evalf(%); -0.2251461988 > evalf[30](`%%`); -0.225146198830409356725146198830 -- Jean-Marc
Hi Jessica, The Maple interactive Precalculus Tutors may be of interest. Go to menu Tools -> Tutors -> Precalculus. There you will have the choice among nine interactive applications dealing with function composition, slopes, limits, conics, etc. Regards, Jean-Marc
> solve(y(x)+3, x); RootOf(y(_Z) + 3) > solve(y(x)+3, y); proc(x) ... end; > solve(int((x+3)*y(t), t = 0 .. 2) = x^2+1, y); Warning, solutions may have been lost So, what is/are exactly your question(s)? Solve solves equations (and inequalities too) which the first two epressions you gave are NOT. equation, n. a formula that asserts that two expressions have the same value; it is either an identical equation (usually called an identity), which is true for any values of the variables, or a conditional equation, which is only true for certain values of the variables (the roots of the equation). For example, x2- 1 = (x + 1)(x - 1) is an identity, and x2- 1 = 3 is a conditional equation with roots x = ±2. (from Maple online dictionary) Regards, Jean-Marc
Hi Larry, I am not sure to have fully understood what is exactly your question -- I mean modeling the physical phenomenon in the form of a linear first-order differential equation or understanding Maple syntax and commands to solve this ivp -- so I will start from the beginning. Say we are modeling the movement of a particle along a straight line, that is we are working in a one-dimensional space. Only one coordinate is needed. Say that the particle is moving vertically, so we use the y-axis. The distance is given by a function that depends on the variable , the time. Now the velocity of the particle is the first derivative of the yet unknown function Since we know that the velocity added to the distance at any given time is equal to the time squared, we can write our ODE as In addition, we know that the particle is at the position when . Now we have everything to solve the IVP with the Maple function . We can also get a graph of the solution by extracting the right-hand side of the above expression. Well, I hope this helps. Jean-Marc P.S. This is my first post on MaplePrimes and also the first time I use the automatic conversion tool. I hope that everything will be readable. This post generated using the online HTML conversion tool Download the original worksheet
First 8 9 10 Page 10 of 10