Items tagged with homework homework Tagged Items Feed

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.

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..?

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;

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

 

we use Modern Computer Algebra

let f=x^15-1 belong to Z[x]. take a nontrivial factorization f≡gh mod 2 with g,h belong to Z[x] monic and of degree at least 2. computer g*,h* belong to Z[x] such that   f≡g*h* mod 16 ,deg g*=deg g, g*≡g mod 2.

show your  intermediate. can  you guess some factors of f in Z[x]?

 

we use Modern Computer Algebra book  

trace algorithm 15.2 on factoring f=30x^5+39x^4+35x^3+25x^2+9x+2 belong to Z[x].choose the prime p=5003 in step.

Dear all;

Special thanks for all the member who help me in Maple.

My last question is:

Write a maple procedure that solves for y(1) in the initial value problem y'(x)=f(y), y(0)=1

using a Numerical stencil based on the n^{th] order taylor series expansion of y.

The procedure arguments include an arbitrary function f, an integrer n, representing the accuracy of the taylor series expansion, and N representing the number of steps between x=0 and x=1.

 

 

 

Given a 2x2 matrix I am struggling to write a function that would return a list (a,b, a1, a2) of 2 complex numbers followed by 2 vectors such that the set of the 2 vectors is a basis for CxC and also Ab1=ab1, Ab2=Bb2 if these exist

 

Any ideas would be greatly appreciated

Dear all,

I need to compute the error, How to define the error between the exact and approximation.

 

                               d              
                              --- y(x) = -y(x)
                               dx             
                               y(x) = exp(-x)

 

I have a problem in this code, my goal is to compute the error between the approximate solution obtained by RK3 and Exact  and E ( approximation by RK3).

How to definie the error and prouve that the error is O(h^4)  ( with one step) and the global error is O(h^3).

Thank you  for helping me.

 

 

 

hi everybody

I want to solve this system of equations


t*((p-.764*z-2.194768)^2-1.170308549+.529948*(z-.382)^2)-(1-t)*p
t*((p+.382*z+.661624*y-1.907568)^2-1.018097144+.529984*(-.866*y-.5*z-.382)^2)+(1-t)*y
t*((p+.382*z-.661624*y-2.470348)^2-1.31636154+.529984*(.866*y-.5*z-.382)^2)+(1-t)*z


while t varies from 0 to 1 by 0.0001 interval. Using newton raphson method, the inital value for each step is the result of the previous step for y,z,p. the very initial values are y=1,z=1,p=1


please help me. Thanks

Dear all

Is there any one can help me to find  the Maple code to solve ODE : y'(x)=f(x,y(x))  using n-step  Adams-Moulton Methods.

The code exist  with mathematica in this link:

http://mathfaculty.fullerton.edu/mathews/n2003/AdamsBashforthMod.html

there is also the code of this method with Matlab, see please:

 http://www.math.mcgill.ca/gantumur/math579w10/matlab/abm4.m

 

But I want file.mw ( with maple)

Thank you very much for helping me.

 

 

 

 

 

 

Dear all;

 

Thanks ifor looking and help me in my work. Your remarks are welcome.Description:
 This routine uses the midpoint method to approximate the solution of
     the differential equation $y'=f(x,y)$ with the initial condition $y = y[0]$
     at $x = a$ and recursion starting value $y = y[1]$ at $x = a+h$.  The values
     are returned in $y[n]$, the value of $y$ evaluated at $x = a + nh$.       
                                                                          
Arguments:     
\begin{itemize}
\item  $f$  the integrand, a function of a two variables
                
                \item $y[]$ On input $y[0]$ is the initial value of $y$ at $x = a$, and $y[1]$
                is the value of $y$ at $x = a + h$,
                \item on output for $i \geqslant 2$
             $$ y[i] = y[i-2] + 2h f(x[i],y[i]); \quad \quad x[i] = a + i h.$$
             \end{itemize}

 
CODE USING MAPLE

 Midpoint-Method=proc(f,a,b, N)

h:=(b-a)/N;
x[0]:=a;
y[0]:=1:

 for n from 2 to N do
    x[n] := a+n*h;
    y[n+1] = y[n-1] +  2h f( x[n], y[n] );
od:
// Generate the sequence of approximations for the Improved Euler method
data_midpoint := [seq([x[n],y[n]],n=0..N)]:
//write the function;
F:=(t,y)-> value of function ;

//Generate plot which is not displayed but instead stored under the name out_fig for example
out_fig := plot(data_midpoint,style=point,color=blue)

 

Your remarks.

Thanks

 

 

 

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

j:=1;
                               1
for i from 2 to 10
while ithprime(j)<2^i do
j:=j+1
end:
print(2^i,primes=j-1):
                        2048, primes = 9

I need to edit this code to satisfy a IF then Statement. can any one help me out?

\

regards "Geordi"

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