# Items tagged with studentstudent Tagged Items Feed

### empty square brackets in integral solution...

3 hours ago
1 3

I am facing a kind of strange problem. Whenever I enter Int(exp(-s t) t^2,t) and try to see full solution using Student[Calculus1]:-ShowSolution(), it gives empty square brackets [ ] as superscripts of e. If I restart Maple engine and perform the same, sometimes it produces right solution. Kindly help, what is this? Same integral does not give problem if done with parameter 'r' instead of 's'.

### Problem with naief discrete logarithm algorithm...

January 28 2015
0 2

Dear mapleprimes users,

I have a problem concerning this function:

Naief := proc(A::integer,B::integer, p::posint)
local x, a:= A mod p, b:= B mod p;

for x from 1 to p-1 do
if a^x mod p = b then return x end if
end do;
print(¨No solution.¨)

end proc

It works fine for what it should do, finding x for a^x = b mod p by inserting x from 1 to p-1 until it finds an
apprioperate x.

My problem is concerning its computation time, which I like to calculate with:

Codetools:- Usage(Naief(a,b,p), output = [cputime], quiet, iterations= 2^12)

The problem is that keeps repeating

alot even when a,b and p are immensely huge. I dont know how to fix it, because I need real CPUtimes which increase
a,b and p increase. I get the idea that the values of the CPUtime are not realistic.

Thanks for the help!

### Why the disparity in solution...

January 24 2015
0 5

Why the disparity in the solution of P1 and P2? P1 uses finite difference while P2 uses midrich.

See them here P1.mw     and   P2.mw

### latex output from ShowSolution ...

January 23 2015
0 0

I want to put the solution obtained from ShowSolution() command of Student[Calculus1] into my LaTeX file. How I can achieve that?

I succeeded in getting latex of ExpandSteps because it was a module, but ShowSolution() is not a module.

### How do I use Gauss Elimination Method for nonlinea...

January 12 2015
0 1

Good day everyone, could you please help use Gauss Elimination method for these system of equations. See the worksheet here F1.mw

Thanks.

### Error, (in dsolve/numeric/bvp) initial Newton iter...

January 12 2015
1 2

Dear All,

I am solving 6 ODE equations with boundary conditions using Runge kutta Felbergh 45 (Maple 12). then, i got this problem.. any suggestion??

Thank you :)

 >
 >
 (1)
 >
 (2)
 >
 (3)
 >
 (4)
 >
 (5)
 >
 (6)
 >
 (7)
 >
 (8)
 >
 Error, (in dsolve/numeric/bvp) initial Newton iteration is not converging
 >
 (9)
 >
 (10)

 >
 Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct
 >
 >

### Simplifying a procedure's result...

January 10 2015
0 4

Hi all,

I'm having some trouble trying to make it so the answer Max(3,1,x,4) turns into Max(x,4), that is, only the greates number and the non numerical values are returned. I've tried a bunch of different things, but have gone out of ideas.

This is the link to the Maple file :6-1.mw and this is the code:

 > #Improve the general Max procedure on page 224 so that Max(3,x,1,4)returns Max(x,4). That is, the procedure returns the maximum numerical value along with all nonnumerical values.
 > Max:=proc() local m, i; m:=-infinity; for i in (args) do   if not type(i, numeric) then     return 'procname'(args):   end if;   if i>m then     m:=i   end if; end do; m; end proc;
 (1)
 > Max(3,1,x,4);
 (2)
 >

Would really appreaciate your help with this

### random value at each time step...

January 09 2015
2 5

Hello,

I am trying to make c (0.001<=c<=0.02) a random value at each time step.But with my code c is choosing randomly from the interval then solveing the equation for fixed c at each time step.

How can I mack c a diffrent random value at each time step?

This is my code:

> with(DEtools); with(plots);
>
> Ra := RandomTools:-Generate(distribution(Uniform(0.001, 0.02))); c := Ra;
> f := .1;
>
> eq := diff(X(t), t) = 1-f-c*X(t);
>
> init := X(0) = 100;
>
> sol := dsolve({eq, init}, {X(t)}, range = 0 .. 100, numeric);
>
> odeplot(sol, [[t, X(t)]], t = 0 .. 100);

Thank you

### Problem with function...

January 07 2015
0 3

Hi all!

I have this function:

I need to find only the x for which a^x = b mod p is a solution of.

### LU Decomposition of n-by-n Matrix...

January 03 2015
0 1

>restart:
>with(LinearAlgebra):
>with(Student[NumericalAnalysis]):
s := {E[1], E[2], E[3]};
v := {x[1], x[2], x[3]};
A := GenerateMatrix(s, v);
B := augment(A)
Then what i do that for any matric i can use same program.

### How can error in fsolve be corrected?...

December 17 2014
1 2

Could anyone assist in rectifying this error ''Error, (in fsolve) {f[1], f[2], f[3], f[4], f[5], f[6], f[7], f[8], f[9], f[10], f[11], theta[11]} are in the equation, and are not solved for''. Here is the worksheet FDM_Revisit_1.mw

### how to plot inequality with maple 12...

December 14 2014
0 2

I'd like to plot the following inequalities:

sqrt(x)<=1/sqrt(2)

1/sqrt(2)<sqrt(x)<=1/sqrt(2)

### can maple give answer for int(cos(x)^n,x) ?...

December 13 2014
2 11

Was trying to see if I can get the reduction formulas for int(cos(x)^n,x) in maple. But it seems no assumption used can make Maple give any result for this.  Mathematica gives a result using Hypergeometric2F1 (even with no assumption on n, which I am not sure about now), but was wondering why maple can't do this one:

restart;
int( (cos(x))^n,x) assuming n::integer;

int( (cos(x))^n,x) assuming n::posint;
same

In Mathematica, I get:

I am newbie in Maple, so may be I am missing some command or doing something wrong.

ps. I was trying to obtain

But this is lost case now. I just need to find out first why int(cos(x)^n,x) does not evaluate to anything in Maple.

fyi, the Hypergeometric result for $\int cos^n(x) \,dx$ can be seen in this reference (half way down the page):

http://www.integraltec.com/math/math.php?f=cosPower.html#cos

ps. can't one enter Latex in this forum like at stack exchange?

### Error, (in isolate) cannot isolate for a function ...

December 10 2014
0 9

Hello,

Im solving 4 ODE equations with BC. im trying to shoot the initial value but im having this error:

""Error, (in isolate) cannot isolate for a function when it appears with different arguments""

anyone could help me???

 >
 >
 >
 >
 >
 >
 >
 >
 (1)
 >
 (2)
 >
 (3)
 >
 >
 Error, (in isolate) cannot isolate for a function when it appears with different arguments
 >

### How to plot the Taylor Polynomial approximation...

December 08 2014
0 2

Hi everyone, I have been trying to plot the Taylor Polynomial approximation with the following code. However, my maple crushes everytime I run it. I indexed some of the variables to get the plot. The code works fine without the index. What did I do wrong?

y := array(1 .. 2);

Digits := 10;

n := 30;

h := .1;

T := 0;

X := 1;

f := (x, t) -> 1/(3*x(t)-t-2);

one := 1/(3*x(t)-t-2);

two := diff(f(x, t), t);

first := diff(x(t), t)

for k to n do

y[1] := subs(t = T(k), x(T(k)) = X(k), one);

y[2] := subs(first = y[1], t = T, x(T(k)) = X(k), two);

X[k+1] := X+sum(y[i]*h^i/factorial(i), i = 1 .. 2);

T[k+1] := T+h

end do;

X[n];

data := [seq([T[n], X[n]], n = 0 .. 30)];

p[2] := plot(data, style = point, color = blue);

p[3] := plot(data, style = line, color = blue);
display(p[2],  p[3])

The code without Index (which works fine)

y := array(1 .. 2);

Digits := 10;

n := 30;

h := .1;

T := 1;

X := .1547196278;

f := (x, t) -> 1/(3*x(t)-t-2);

one := x(t)^4*e^t-(1/3)*x(t);

two := diff(f(x, t), t);

first := diff(x(t), t);

for k to n do

y[1] := subs(t = T, x(T) = X, one);

y[2] := subs(first = y[1], t = T, x(T) = X, two);

X := X+sum(y[i]*h^i/factorial(i), i = 1 .. 2);

T := T+h

end do

 1 2 3 4 5 6 7 Last Page 1 of 134
﻿