getting_started_with_symbolics/questions.rst
changeset 522 d33698326409
equal deleted inserted replaced
521:88a01948450d 522:d33698326409
       
     1 Objective Questions
       
     2 -------------------
       
     3 
       
     4 .. A mininum of 8 questions here (along with answers)
       
     5 
       
     6 1. How do you define a name 'y' as a symbol?
       
     7 
       
     8 
       
     9    Answer: var('y')
       
    10 
       
    11 2. List out some constants pre-defined in sage?
       
    12 
       
    13    Answer: pi, e ,euler_gamma
       
    14 
       
    15 3. List the functions for differentiation and integration in sage?
       
    16 
       
    17    Answer: diff and integral
       
    18 
       
    19 4. Get the value of pi upto precision 5 digits using sage?
       
    20 
       
    21    Answer: n(pi,5)
       
    22 
       
    23 5.  Find third order differential of function.
       
    24 
       
    25     f(x)=sin(x^2)+exp(x^3)
       
    26 
       
    27     Answer: diff(f(x),x,3) 
       
    28 
       
    29 6. What is the function to find factors of an expression?
       
    30 
       
    31    Answer: factor
       
    32 
       
    33 7. What is syntax for simplifying a function f?
       
    34 
       
    35    Answer f.simplify_full()
       
    36 
       
    37 8. Find the solution for x between pi/2 to pi for the given equation?
       
    38    
       
    39    sin(x)==cos(x^3)+exp(x^4)
       
    40    find_root(sin(x)==cos(x^3)+exp(x^4),pi/2,pi)
       
    41 
       
    42 9. Create a simple two dimensional matrix with two symbolic variables?
       
    43 
       
    44    var('a,b')
       
    45    A=matrix([[a,1],[2,b]])
       
    46 
       
    47 Larger Questions
       
    48 ----------------
       
    49 
       
    50 .. A minimum of 2 questions here (along with answers)
       
    51 
       
    52 1.Find the points of intersection of the circles
       
    53 
       
    54  x^2 + y^2 - 4x = 1 
       
    55  x^2 + y^2 - 2y = 9  
       
    56 
       
    57 2. Integrate the function 
       
    58 
       
    59 x^2*cos(x)
       
    60 
       
    61 between 1 to 3.