Items tagged with homework homework Tagged Items Feed

How can I use separation of variable to solve heat equation ut=uxx on a rod of length pi/4 with u(0,t)=0, u(pi/4)=0 and u(x,0)=x(pi/4-x) 

then solve heat equation by laplace transform

Hi can you please help me? I want to write a program in Maple code, using the Newton-Raphson method, to solve the equation tan(x) −x-1=0 .  the approximate root is 1.5.
I tried doing this using a while loop to compare the last and current iterates, but something is not working.
so can you please help me do that?

Thanks

I need to write a procedure that takes an integer N and a boolean function F as in14 as arguments, returns nothing, and plots a square N × N lattice of points, coloring the points (i, j) with F (i, j) true in red and the other ones blue. 

Thank you in advance. Any help with this would be apreciated. 

 

Hi.

Please help to use dsolve.

Suppose I have a Matrix A of size two. Y=[u,v].

Y'(t)=A*y(t).

How can use dsolve this problem.

Thanks

 

 

 

 

hello, 

so i've been having trouble with this one for a while. I think i'm just missing something simple.. maybe yous could help.

all we have to do is to write a maple procedure that takes an integer N and a boolean function F as in14 as arguments, returns nothing, and plots a square N N lattice of points, coloring the points (i; j) with F(i; j) true in red and the other ones blue.

thaaaanks.

Dear all;

Than you for help.

how  many steps are required to achieve a error of 1.e-3 in the numerical value of y(1).

Here The 3 -step procedure  Range Kutta Method.

## Exact  solution  

### We will modifty N ( number of steps to get error =10^(-3). )

 

## Procedure Range Kutta

> RK3 := proc (f, a, b, y0, N)

local x, y, n, h, k, vectRK3;

y := Array(0 .. N);

x := Array(0 .. N);

h := evalf(b-a)/N;

x[0] := a; y[0] := 1;

for n from 0 to N-1 do

x[n+1] := a+(n+1)*h;

k[1] := f(x[n], y[n]);

k[2] := f(x[n]+(1/2)*h, y[n]+(1/2)*h*k[1]);

k[3] := f(x[n]+h, y[n]+h*(-k[1]+2*k[2]));

y[n+1] := y[n]+(1/6)*h*(k[1]+4*k[2]+k[3])

end do;

[seq([x[n], y[n]], n = 0 .. N)]; y[1];

end proc;

## Now  we compute the error between y(1) and exact  solution for different value of  N

### I have a problem in this part


 errorRk3 := array(1 .. 29);
 for N from  2 to 30 do

errorrRk3[N] := abs(eval(rhs(res), x = 1)-RK3((x,y)->-y,0,1,N));

if errorrRk3[N] =10^{-3} end ;
end  do ;

 

 

write a maple package for quaternion polynomials.it must include the following procedures:

1) for quaternion polynomials f, g:  find degree of f , compute f +g ,f-g, fg.

2)for matrices over quarternion polynomials A,B: compute A+B,A-B, AB.

hint using records to represent quaternions.

Dear All;

Happy, to discuss with you these lines, and thank you to help me.

My goal is:

 

ode := D(y)(x) = f(x,y(x));
                          
In this expression, is assumed to be a known function of the independant variable
                                      x
 and the function that we are trying to solve for
                                    y(x)
.  The simplest numerical stencils to solve this equation will give us an approximation to
                                      y
 at some point
                                  x = X + h
 given some knowledge of
                                      y
 at
                                    x = X
.  All of these stencils are based on the Taylor series approximation for
                                    y(x)
 about
                                    x = X
 to linear order:
eq1 := y(x) = series(y(x),x=X,3);
                       
eq2 := h = x - X;
eq3 := subs(isolate(eq2,x),eq1);
                                
Now, we can remove the first derivative of y
                                     
 by making use of the differential equation:
eq4 := subs(x=X,ode);
eq5 := subs(eq4,eq3);
                           

Now we must compute the same for y(x-h)  and then make.  How can I do this please

(a) Design your own 3-stage explicit Runge-Kutta method with one-step error O(h4).

(b) Test your method by solving y= −y. Confirm that the global error in your numerical solution

is O(h3).

Numerical Method ...

March 04 2014 alshehri 5

Write a Maple procedure that solves for y(1) in the initial value problem

                     y= f(y),     y(0) = 1,

 

 

using a numerical stencil based on the nth order Taylor series expansion of y. The procedure’s arguments should include an arbitrary function f, an integer n representing the accuracy of the Taylor series expansion, another integer N representing the number of steps between x = 0 and x = 1. Pick a test problem and compare your results with the output of dsolve/numeric.

Midpoint method ...

March 03 2014 alshehri 5

Question_.pdf

 

this question about midpoint method I need help with the part c

 

thanks

i wanted a taylor series  of the expression sin(xy) my code;

mtaylor(sin(x*y),[x=1,y=2],6); and it worked like a charm

sin(2)+2*cos(2)*(x-1)+cos(2)*(y-2)-2*sin(2)*(x-1)^2+(-2*sin(2)+cos(2))*(y-2)*(x-1)-(1/2)*sin(2)*(y-2)^2-(4/3)*cos(2)*(x-1)^3+(-2*sin(2)-2*cos(2))*(y-2)*(x-1)^2+(-sin(2)-cos(2))*(y-2)^2*(x-1)-(1/6)*cos(2)*(y-2)^3+(2/3)*sin(2)*(x-1)^4+(-2*cos(2)+(4/3)*sin(2))*(y-2)*(x-1)^3+(-2*cos(2)+(1/2)*sin(2))*(y-2)^2*(x-1)^2+(-(1/2)*cos(2)+(1/3)*sin(2))*(y-2)^3*(x-1)+(1/24)*sin(2)*(y-2)^4+(4/15)*cos(2)*(x-1)^5+((4/3)*sin(2)+(2/3)*cos(2))*(y-2)*(x-1)^4+(-(1/3)*cos(2)+2*sin(2))*(y-2)^2*(x-1)^3+(-(1/6)*cos(2)+sin(2))*(y-2)^3*(x-1)^2+((1/12)*cos(2)+(1/6)*sin(2))*(y-2)^4*(x-1)+(1/120)*cos(2)*(y-2)^5

now i need to plot the darn thing. so i tried to use tayplot function but i get nothing. is there a special package i need to use tayplot etc..?

display grades operation....

February 27 2014 Dira 20

im trying to input a number between 0-100 and have the operation return the grade a,b,c,d,f. etc though long i though this might work.

Grades:=proc(x)
local a,b,c,d,f;
a:=(100..89.5);
b:=(89.4..79.5);
c:=(79.4..69.5);
d:=(69.4..59.5);
f:=(59.4..0);
if x=(100..89.5) then
display(a);
else
if x=(89.4..79.5)then
display(b);
else
if x=(79.4..69.5) then
display(c);
else
if x=(69.4..59.5) then
display(d);
else
if x=(59.4..0) then
display(f)
end;
end;
end;
end;
end;
end;

if then statement problem...

February 27 2014 Dira 20

count the number of primes less than using an if-then statement.  Implement your code where j goes from 2 to 15. 

im at a loss i need a little nudge in the right direction.

we use modern computer algebra books

i) computer the GSO of (22,11,5),(13,6,3),(-5,-2,-1) belong to R^3.

ii)trace algorithm 16.10 on computer a reduced basis of the lattice in Z^3 spanned by the vectors form(i).

trace also the values of the d_i and of D, and compare the number of exchange steps to the theoretical upper bound from section 16.3

 

1 2 3 4 5 6 7 Last Page 3 of 14