Items tagged with homework homework Tagged Items Feed

Hello everyone! My English is not very good. 

I have writtien Lucas sequence program:

F := proc (n::nonnegint)

option remember;

if n < 2 then n else F(n-1)+F(n-2) 

end if;

end proc;

L := proc (n::nonnegint)

if n = 0 then return 2 end if;

if n = 1 then return 1 end if;

if n <> 0 and n <> 1 then return

L(n-1)+L(n-2) end if; end proc;

S:=proc(n::nonnegint)

 local i;  

for i from 1 by 1 to n do   S(i)=L(i)^(2)-5*F(i)^(2);

 print("%a",S(i));  end proc: 

 

And Maple notice :error

I don't know call procedure inside another procedure. 
Thank you so much

Regards

sunflower

Hello everyone!

Prime:= proc (a, b)

local i, p, r;

p := ();

r :=() ;

for i from a to b do

   if isprime(i) then p := p union (i) end if;

     if type(sqrt(p[i]-1), integer) then r := r union (p[i]) end if;

end do

end proc;

Prime(1, 10)

My English is not very good. I don't know what erros I get in my program. Thank everyone

Hello every one. I writed:

M:=-2,-1,0,1,2:
f:=x->2^x
with(LinearAlgebra);
for i from 2 by 1 to nops(M) do
for j from 2 by 1 to i
Q(i,j)->((x-M[i-j])*Q(i,j-1)-(x-M[i])*Q(i-1,j-1))/(M[i]-M[j-1]):
A:=Matrix(Q,nops(M),nops(M)+1):

end do;
end do;
print(A)
But I don't know wrong in my code. That is Neville algorithm

can you help me? sorry, my English is not very good

f:=proc(x)
return 2^x
n:=5
M:=-2,-1,0,1,2
P:=1
for k to n+1 do
L:=1
for i to n+1 do
if i<>k then
L:=L*(x-M[i])/(M[k]-M[i]); end if; end do;
P:=P+f(M[k])*L;
end do;
I write Lagran algorithm. sorry, my english is not very good

and why are there decimal points after certain numbers?

I'm taking 2nd semester calculus and in this maple lab, I can't seem to get Maple to evaluate this correctly. Any help is appreciated.

My friend did this and got the first constant, 392..., and just a2, so it was 392.07a2

Hello all! How to create this plot in Maple? 

I am doing a Calculus assignment and I can't find the commands for certain things.

1.Given the function f(x) = ((x+1)^2) / (1+x^2)

i) The domain of continuity of f(x)

ii) The intervals of increase and decrease of f(x) by using test points.

 

2. Use the IVT to prove existence of a root to the equation x^3 +10x^2 -100x +50=0 in the interval [-20,10]. Use again the IVT to show that there is a 1st root in [-17,-15], a 2nd toot in [0,1] and a 3rd root in [ 5,6]. Find or approximate those roots with Maple. (the bolded is what I need help).

I want to plot E with respect to t.

I typed the sys of this equation and try to plot it with DEplot but failed.

This is the code

DEplot([sys], [x(t), y(t), E(t)], t = -25 .. 25, [[x(0) = -.3, y(0) = .2]], scene = [E(t), t], stepsize = 0.5e-1, linecolor = red, arrows = none);

The error is Error, (in DEtools/DEplot/CheckDE) derivatives must be given explicitly.

Eager to know the answer, please help me . Thanks very much.

 

Im working on an assignment involving a rocket being launched vertically from rest. 
I have a eq. of motion that looks like this: v(t)=vs*ln(-m0/(r*t-m0))-g*t

Now Im supposed to implement the air resistance, and write an expression for the total force on the rocket. After that creating a plot displaying the speed v(t) as a function of time for both, with and without air resistance. 

All constants are known including CD, rho and A for the dragforce. 

I would be grateful if anyone could help me with this!

Thanks

Im working on a assignment on maple. I have an equation of motion that looks like this:  v(t):= -g*t-vs*ln(r*t-m)+vs*ln(-m)
Im supposed to use this equation and solve it for t an later integrate it. Since the constant inside the ln is negative I end up with a annoying imaginary part. Is there any way to covert this equation so that the ln disappear, so that I can get a result whitout a imaginary part?

How would I find inflection points? I believe it would the same as if I was finding critical points for f '.

Function is:(7-x)*sin(x^2-7)

So would it be:

a:=fsolve(f2,-2.4..2.4);
b:=fsolve(f2,-2.4..-0.06);
c:=fsolve(f2,-0.06..2.4);
d:=fsolve(f2,1.49..3);
e:=fsolve(f2,-3 ..-1.52);

 

Plz and thanks!

Hi,

Ive been trying to solve critical points for maple but i keep getting this werid equation:

(1/7)*RootOf(tan(_Z)^2+4*_Z*tan(_Z)+4*_Z^2+28*tan(_Z)-140*_Z-1176)+1+(1/14)*tan(RootOf(tan(_Z)^2+4*_Z*tan(_Z)+4*_Z^2+28*tan(_Z)-140*_Z-1176)).

 

What I have typed

f:=x->(7-x)*sin(x^2-7);

f1:=D(f);

When I try putting:

solve(f1(x)=0);

I get that werid equation

 

Hi, I am working on an assignment and I am having difficulties with this Eurler method since I am working with vector.

The assignment:

If the aircraft's engine transmits power P to the air, the force of the propellar, Fp, satisfies P=Fpv. Since the force Fp acts in the direction of motion, it can be written in vector form as: (what I have so far)


with(linalg);

v:=Vector(2,1,[vx,vy]); velocity vector

nu:=v->Norm(Vector(v),2); (length of v)

Fd:=-1/2*C*rho*A*nu*v # air resistance

Fl:=1/2*Cl*rho*A*nu*v # liftforce in y direction here v=[-vy,vx]

Fp:=(P/nu^2)*v^2 # power from aircraft

All this adds up to:

F_T:=v->Vector(evalm(Fp/nu(v)^2*v+Fd*nu(v)*v+Fl*nu(v)*zip((x,y)->x*y,v([2,1]),Vector([-1,1]))+Vector(2,1,[0,-m*g]))); # I have tried it and it works

 

so up til here I am good. It is this next part that I can't seam to get.

Write a routine which uses Euler's method to solve the equation of motion numerically for velocity v(t):

m*dv/dt=F_T(v)

Test the program by trying a plane with intitial velocity [v0,0] such that it maintains this speed when the engines power is P=P0

We have been given an Esolve we can use:

Esolve:=proc(f::procedure,h,x0,y0,N::integer) # Calculates y(x0+n*h) for n=1..N given y0=y(x0) and f(x,y)

local n,y,x;

y[0]:=y0; # Start Value
x:=x0;

for n from 1 to N do
y[n]:= y[n-1]+h*f(y[n-1],x); # Euler's formula
x:=x+h; # Next x
end do;

y;

end proc;

 

If anyone could help me understand how it works and how to get this to work with vectors I would be very gratefull.

Consider the following function.

f (x) = ( x3 − 442x2 + 65107x − 3196058) e1/x 

f:=x->(x^3-442*x^2+65107*x-3196058)*exp(1/x); 
Use Newton's method to find all 3 roots (correct to at least 6 decimal places) of f (x). (Note that you might have to increase the 'Digits' variable to 15, i.e., Digits:=15, in order to get the required accuracy.)

 my answer are 143.2030067,143.2030339,143.2030610

but, it is wrong. can anyone tell me where is the wrong part?

please!!

2 3 4 5 6 7 8 Last Page 4 of 22